summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArun Persaud <arun@nubati.net>2012-06-03 10:15:31 -0700
committerArun Persaud <arun@nubati.net>2012-06-03 10:15:31 -0700
commit6a253bce9766ec2128d27d7fd02194dd7ed4afaf (patch)
treeef343c350545589db8f420b231a029b459441ff4
parent22bd56c3686530b61c930e728eaade45ee17d9cc (diff)
downloadphoto-tags-6a253bce9766ec2128d27d7fd02194dd7ed4afaf.tar.gz
photo-tags-6a253bce9766ec2128d27d7fd02194dd7ed4afaf.tar.bz2
photo-tags-6a253bce9766ec2128d27d7fd02194dd7ed4afaf.zip
added a help function to create_thumbnails script
-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