]> git.scottworley.com Git - picsort/blobdiff - pic-mv
Insert rotations in order, not reverse order
[picsort] / pic-mv
diff --git a/pic-mv b/pic-mv
index e1e18ac09d531c05648510d7b7808fa5e0f6e7a5..b84390c80a307dc0984a02478edb5a26e5f67270 100755 (executable)
--- a/pic-mv
+++ b/pic-mv
@@ -34,10 +34,11 @@ if [[ "$file" == *.NEF ]];then
   else
     mv -vi "$exposure/$base.jpeg" "$out"
   fi
   else
     mv -vi "$exposure/$base.jpeg" "$out"
   fi
+  touch -r "$file" "$out"
   mv -vi "$file" "$destdir/$name $number.NEF"
 else
   if [[ "$rotate" ]];then
   mv -vi "$file" "$destdir/$name $number.NEF"
 else
   if [[ "$rotate" ]];then
-    sed -i "s/^# ROBOTS_INSERT_THINGS_HERE\$/&\n\"$name $number.jpeg\" => $rotate," "$destdir/rotations.php"
+    sed -i "s/^# ROBOTS_INSERT_THINGS_HERE\$/\"$name $number.jpeg\" => $rotate,\n&/" "$destdir/rotations.php"
   fi
   mv -vi "$file" "$out"
 fi
   fi
   mv -vi "$file" "$out"
 fi