From: Scott Worley <scottworley@scottworley.com>
Date: Sun, 6 Apr 2014 05:12:08 +0000 (-0700)
Subject: Editing scripts to use them is lame
X-Git-Url: http://git.scottworley.com/picsort/commitdiff_plain/d6874f6c6a9f60aacee8cd43fd16f3e9b73b22ec

Editing scripts to use them is lame
---

diff --git a/.gitignore b/.gitignore
index fdde87f..b57bdec 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
 ??
 *.jpeg
 *.NEF
+.default-pic-mv-destdir
diff --git a/pic-mv b/pic-mv
index 92444da..23da8c3 100755
--- 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"