]> git.scottworley.com Git - picsort/blobdiff - pic-mv
Editing scripts to use them is lame
[picsort] / pic-mv
diff --git a/pic-mv b/pic-mv
index 92444da6b8cace709734c0c105d2a977c703c712..23da8c3746cf49f1f98444c418a1c8ef4c0e1506 100755 (executable)
--- a/pic-mv
+++ b/pic-mv
@@ -1,6 +1,9 @@
 #!/bin/bash
 
-destdir=/some/path  # Optional: Fill this in here.
+destdir=
+if [[ -e .default-pic-mv-destdir ]];then
+  destdir=$( < .default-pic-mv-destdir )
+fi
 
 exposure=
 rotate=
@@ -13,6 +16,11 @@ while getopts d:e:r: opt;do
 done
 shift `expr $OPTIND - 1`
 
+if [[ -z "$destdir" ]];then
+  echo "Please specify a destdir with -d or .default-pic-mv-destdir" >&2
+  exit 1
+fi
+
 file="$1"
 name="$2"