]> git.scottworley.com Git - picsort/blobdiff - pic-mv
Copy the NEF's timestamp to the final .jpeg
[picsort] / pic-mv
diff --git a/pic-mv b/pic-mv
index 2774a6928fb23674c8c9c2774991231ce2caf715..195b9596887487f8a68f1a83ae4e704c8705fd8b 100755 (executable)
--- a/pic-mv
+++ b/pic-mv
@@ -24,18 +24,21 @@ else
   number=1
 fi
 
   number=1
 fi
 
+out="$destdir/$name $number.jpeg"
+
 if [[ "$file" == *.NEF ]];then
   base="${file%.NEF}"
   if [[ "$rotate" ]];then
 if [[ "$file" == *.NEF ]];then
   base="${file%.NEF}"
   if [[ "$rotate" ]];then
-    echo "NEF rotation not yet implemented" >&2
-    exit 1
+    numeric_exposure=$(dc <<< "2k $exposure 4 / 3.5-p")
+    pics-run-ufraw "$numeric_exposure" "$file" "$out" "$rotate"
   else
   else
-    mv -vi "$exposure/$base.jpeg" "$destdir/$name $number.jpeg"
-    mv -vi "$file" "$destdir/$name $number.NEF"
+    mv -vi "$exposure/$base.jpeg" "$out"
   fi
   fi
+  touch -r "$file" "$out"
+  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"
   fi
 else
   if [[ "$rotate" ]];then
     sed -i "s/^# ROBOTS_INSERT_THINGS_HERE\$/&\n\"$name $number.jpeg\" => $rotate," "$destdir/rotations.php"
   fi
-  mv -vi "$file" "$destdir/$name $number.jpeg"
+  mv -vi "$file" "$out"
 fi
 fi