From b190b5aa57148a22296413915d73c36e3445a3d6 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Mon, 16 Jul 2012 21:24:19 +0400 Subject: [PATCH] Added legacy EXIF updater. Gets EXIF data out of .PSD files and adds it to previews. Signed-off-by: Alex A. Naanou --- legacy/update-exif.sh | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 legacy/update-exif.sh diff --git a/legacy/update-exif.sh b/legacy/update-exif.sh new file mode 100755 index 00000000..270f851d --- /dev/null +++ b/legacy/update-exif.sh @@ -0,0 +1,36 @@ +#!/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 +} + +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