the home site for me: also iteration 3 or 4 of my site
1#!/usr/bin/env bash
2
3# Check if exiftool is installed
4if ! command -v exiftool &> /dev/null; then
5 echo "Error: exiftool is not installed. Please install it." >&2
6 exit 1
7fi
8
9while read -r file; do
10 case "$file" in
11 *.jpg|*.jpeg|*.png|*.gif|*.tiff|*.bmp)
12 echo "Removing EXIF data from: $file" >&2
13 exiftool -all= --icc_profile:all -tagsfromfile @ -orientation -overwrite_original "$file"
14 if [ $? -ne 0 ]; then
15 echo "Error: exiftool failed to process $file" >&2
16 exit 1
17 fi
18 git add "$file"
19 ;;
20 *)
21 ;;
22 esac
23done < <(git diff --cached --name-only --diff-filter=ACMR)
24
25exit 0
26