mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-28 09:50:09 +00:00
fix
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
b5ff27b7d3
commit
a17fe070b7
@ -1,9 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DIR=`pwd`
|
DIR=`pwd`
|
||||||
|
|
||||||
printhelp(){
|
printhelp(){
|
||||||
@ -58,6 +54,7 @@ _exifup(){
|
|||||||
if [[ ${#targets[@]} > 1 ]] ; then
|
if [[ ${#targets[@]} > 1 ]] ; then
|
||||||
# XXX multiple candidates -> select one...
|
# XXX multiple candidates -> select one...
|
||||||
# XXX
|
# XXX
|
||||||
|
echo '!!!!!!!!!!!'
|
||||||
fi
|
fi
|
||||||
# XXX
|
# XXX
|
||||||
exiv2 ex "${target[0]}"
|
exiv2 ex "${target[0]}"
|
||||||
@ -74,39 +71,31 @@ exifup(){
|
|||||||
local PREVIEW_DIR=$1
|
local PREVIEW_DIR=$1
|
||||||
if [ -e "$PREVIEW_DIR" ] ; then
|
if [ -e "$PREVIEW_DIR" ] ; then
|
||||||
echo doing: `pwd`
|
echo doing: `pwd`
|
||||||
exiv2 ex *.psd
|
exiv2 ex *.psd 2> /dev/null
|
||||||
mv *.exv "$PREVIEW_DIR"
|
mv *.exv "$PREVIEW_DIR" 2> /dev/null
|
||||||
cd "$PREVIEW_DIR"
|
cd "$PREVIEW_DIR"
|
||||||
exiv2 -k in *.jpg
|
exiv2 -k in *.jpg 2> /dev/null
|
||||||
rm -f *.exv
|
rm -f *.exv
|
||||||
cd ..
|
cd ..
|
||||||
fi
|
fi
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IFS=$'\n'
|
||||||
if [[ $1 != "" ]] ; then
|
if [[ $1 != "" ]] ; then
|
||||||
if ! [ -d "$1" ] ; then
|
if ! [ -d "$1" ] ; then
|
||||||
echo "\"$1\": is not a directory."
|
echo "\"$1\": is not a directory."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if [ -e "$1/DCIM/preview/" ] ; then
|
DIRS=($(find "$1" -name 'preview'))
|
||||||
cd "$1/DCIM/"
|
else
|
||||||
else
|
DIRS=($(find . -name 'preview'))
|
||||||
cd "$1"
|
fi
|
||||||
fi
|
for d in "${DIRS[@]}" ; do
|
||||||
|
cd "$d"
|
||||||
|
cd ..
|
||||||
exifup ./preview/
|
exifup ./preview/
|
||||||
exifup ./hi-res/
|
exifup ./hi-res/
|
||||||
cd "$DIR"
|
cd "$DIR"
|
||||||
else
|
done
|
||||||
for d in */DCIM/ ; do
|
|
||||||
if [ -e "$1/DCIM/preview/" ] ; then
|
|
||||||
cd "$d"
|
|
||||||
else
|
|
||||||
cd "$d/../"
|
|
||||||
fi
|
|
||||||
exifup ./preview/
|
|
||||||
exifup ./hi-res/
|
|
||||||
cd "$DIR"
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user