summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcreate_thumbnails.sh14
1 files changed, 13 insertions, 1 deletions
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