]> git.scottworley.com Git - picsort/commitdiff
pic-mv chmod's to 644
authorScott Worley <scottworley@scottworley.com>
Mon, 3 Mar 2014 00:38:00 +0000 (16:38 -0800)
committerScott Worley <scottworley@scottworley.com>
Mon, 3 Mar 2014 00:38:00 +0000 (16:38 -0800)
pic-mv

diff --git a/pic-mv b/pic-mv
index b84390c80a307dc0984a02478edb5a26e5f67270..92444da6b8cace709734c0c105d2a977c703c712 100755 (executable)
--- a/pic-mv
+++ b/pic-mv
@@ -28,6 +28,7 @@ out="$destdir/$name $number.jpeg"
 
 if [[ "$file" == *.NEF ]];then
   base="${file%.NEF}"
 
 if [[ "$file" == *.NEF ]];then
   base="${file%.NEF}"
+  NEFout="$destdir/$name $number.NEF"
   if [[ "$rotate" ]];then
     numeric_exposure=$(dc <<< "2k $exposure 4 / 3.5-p")
     pics-run-ufraw "$numeric_exposure" "$file" "$out" "$rotate"
   if [[ "$rotate" ]];then
     numeric_exposure=$(dc <<< "2k $exposure 4 / 3.5-p")
     pics-run-ufraw "$numeric_exposure" "$file" "$out" "$rotate"
@@ -35,10 +36,12 @@ if [[ "$file" == *.NEF ]];then
     mv -vi "$exposure/$base.jpeg" "$out"
   fi
   touch -r "$file" "$out"
     mv -vi "$exposure/$base.jpeg" "$out"
   fi
   touch -r "$file" "$out"
-  mv -vi "$file" "$destdir/$name $number.NEF"
+  mv -vi "$file" "$NEFout"
+  chmod 644 "$NEFout"
 else
   if [[ "$rotate" ]];then
     sed -i "s/^# ROBOTS_INSERT_THINGS_HERE\$/\"$name $number.jpeg\" => $rotate,\n&/" "$destdir/rotations.php"
   fi
   mv -vi "$file" "$out"
 fi
 else
   if [[ "$rotate" ]];then
     sed -i "s/^# ROBOTS_INSERT_THINGS_HERE\$/\"$name $number.jpeg\" => $rotate,\n&/" "$destdir/rotations.php"
   fi
   mv -vi "$file" "$out"
 fi
+chmod 644 "$out"