From cb16e0ca5683d1f0dac8860f96387c3dc9f63a53 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Tue, 16 Jul 2013 18:11:49 +0400 Subject: [PATCH] added the old update-exif.sh script to the repo (uses exiv2)... Signed-off-by: Alex A. Naanou --- scripts/update-exif.sh | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100755 scripts/update-exif.sh diff --git a/scripts/update-exif.sh b/scripts/update-exif.sh new file mode 100755 index 00000000..6e71d975 --- /dev/null +++ b/scripts/update-exif.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +DIR=`pwd` + + +exifup(){ + PREVIEW_DIR=$1 + if [ -e "$PREVIEW_DIR" ] ; then + echo doing: `pwd` + exiv2 ex *.psd + mv *.exv "$PREVIEW_DIR" + cd "$PREVIEW_DIR" + exiv2 -k in *.jpg + rm -f *.exv + cd .. + fi + true +} + +# XXX this does not support absolute paths... +if [[ $1 != "" ]] ; then + if ! [ -d "$1" ] ; then + echo "\"$1\": is not a directory." + exit 1 + fi + cd "./$1/DCIM/" + exifup ./preview/ + exifup ./hi-res/ + cd "$DIR" +else + for d in */DCIM/ ; do + cd "./$d" + exifup ./preview/ + exifup ./hi-res/ + cd "$DIR" + done +fi