]>
git.scottworley.com Git - picsort/blob - pic-mv
b84390c80a307dc0984a02478edb5a26e5f67270
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 out="$destdir/$name $number.jpeg
"
29 if [[ "$file" == *.NEF ]];then
31 if [[ "$rotate" ]];then
32 numeric_exposure=$(dc <<< "2k $exposure 4 / 3.5-p")
33 pics-run-ufraw "$numeric_exposure" "$file" "$out" "$rotate"
35 mv -vi "$exposure/$base.jpeg
" "$out"
37 touch -r "$file" "$out"
38 mv -vi "$file" "$destdir/$name $number.NEF
"
40 if [[ "$rotate" ]];then
41 sed -i "s
/^
# ROBOTS_INSERT_THINGS_HERE\$/\"$name $number.jpeg\" => $rotate,\n&/" "$destdir/rotations.php"