]>
git.scottworley.com Git - picsort/blob - pic-mv
23da8c3746cf49f1f98444c418a1c8ef4c0e1506
4 if [[ -e .default
-pic-mv-destdir ]];then
5 destdir
=$( < .default-pic-mv-destdir )
10 while getopts d
:e
:r
: opt
;do
17 shift `expr $OPTIND - 1`
19 if [[ -z "$destdir" ]];then
20 echo "Please specify a destdir with -d or .default-pic-mv-destdir" >&2
28 max
=$(ls "$destdir" | sed -rn "s/^$name ([0-9]+).jpeg$
/\
1/p
" | sort -n | tail -n1)
35 out="$destdir/$name $number.jpeg
"
37 if [[ "$file" == *.NEF ]];then
39 NEFout="$destdir/$name $number.NEF
"
40 if [[ "$rotate" ]];then
41 numeric_exposure=$(dc <<< "2k $exposure 4 / 3.5-p")
42 pics-run-ufraw "$numeric_exposure" "$file" "$out" "$rotate"
44 mv -vi "$exposure/$base.jpeg
" "$out"
46 touch -r "$file" "$out"
47 mv -vi "$file" "$NEFout"
50 if [[ "$rotate" ]];then
51 sed -i "s
/^
# ROBOTS_INSERT_THINGS_HERE\$/\"$name $number.jpeg\" => $rotate,\n&/" "$destdir/rotations.php"