added a help function to create_thumbnails script
authorArun Persaud <arun@nubati.net>
Sun, 3 Jun 2012 17:15:31 +0000 (10:15 -0700)
committerArun Persaud <arun@nubati.net>
Sun, 3 Jun 2012 17:15:31 +0000 (10:15 -0700)
create_thumbnails.sh

index d1be98dc7df13d6d7e00d80846abce00e35b4197..b652cb30f067678256f044c9c4b1facacf81fa7f 100755 (executable)
@@ -22,8 +22,16 @@ dbprefix=${dbprefix//\//\\\/}
 limit=`$NICE sqlite3 $LOCALDB "select count(*) from photos"`
 
 
+function usage()
+{
+  echo "Usage: $0 [OPTIONS]"
+  echo " Options:"
+  echo "          -r          remove metadata from pictures"
+  echo "          -l NUMBER   only process NUMBER pictures"
+}
+
 # parse command line
-while getopts ":rl:" opt; do
+while getopts ":rl:h" opt; do
   case $opt in
     r)
       removemeta=1
@@ -31,6 +39,10 @@ while getopts ":rl:" opt; do
     l)
       limit=$OPTARG
       ;;
+    h)
+      usage
+      exit 0
+      ;;
     \?)
       echo "Invalid option: -$OPTARG" >&2
       exit 1