From 6a253bce9766ec2128d27d7fd02194dd7ed4afaf Mon Sep 17 00:00:00 2001 From: Arun Persaud Date: Sun, 3 Jun 2012 10:15:31 -0700 Subject: added a help function to create_thumbnails script --- create_thumbnails.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/create_thumbnails.sh b/create_thumbnails.sh index d1be98d..b652cb3 100755 --- a/create_thumbnails.sh +++ b/create_thumbnails.sh @@ -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 -- cgit v1.2.3-18-g5258