3 destdir
=/some
/path
# Optional: Fill this in here.
7 while getopts d
:e
:r
: opt
;do
14 shift `expr $OPTIND - 1`
20 max
=$(ls "$destdir" | sed -rn "s/^$name ([0-9]+).jpeg$
/\
1/p
" | sort -n | tail -n1)
27 if [[ "$file" == *.NEF ]];then
29 if [[ "$rotate" ]];then
30 echo "NEF rotation not yet implemented
" >&2
33 mv -vi "$exposure/$base.jpeg
" "$destdir/$name $number.jpeg
"
34 mv -vi "$file" "$destdir/$name $number.NEF
"
37 if [[ "$rotate" ]];then
38 sed -i "s
/^
# ROBOTS_INSERT_THINGS_HERE\$/&\n\"$name $number.jpeg\" => $rotate," "$destdir/rotations.php"
40 mv -vi "$file" "$destdir/$name $number.jpeg"