projects
/
photo-tags.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
22bd56c
)
added a help function to create_thumbnails script
author
Arun Persaud
<arun@nubati.net>
Sun, 3 Jun 2012 17:15:31 +0000
(10:15 -0700)
committer
Arun Persaud
<arun@nubati.net>
Sun, 3 Jun 2012 17:15:31 +0000
(10:15 -0700)
create_thumbnails.sh
patch
|
blob
|
history
diff --git
a/create_thumbnails.sh
b/create_thumbnails.sh
index d1be98dc7df13d6d7e00d80846abce00e35b4197..b652cb30f067678256f044c9c4b1facacf81fa7f 100755
(executable)
--- a/
create_thumbnails.sh
+++ b/
create_thumbnails.sh
@@
-22,8
+22,16
@@
dbprefix=${dbprefix//\//\\\/}
limit=`$NICE sqlite3 $LOCALDB "select count(*) from photos"`
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
# parse command line
-while getopts ":rl:" opt; do
+while getopts ":rl:
h
" opt; do
case $opt in
r)
removemeta=1
case $opt in
r)
removemeta=1
@@
-31,6
+39,10
@@
while getopts ":rl:" opt; do
l)
limit=$OPTARG
;;
l)
limit=$OPTARG
;;
+ h)
+ usage
+ exit 0
+ ;;
\?)
echo "Invalid option: -$OPTARG" >&2
exit 1
\?)
echo "Invalid option: -$OPTARG" >&2
exit 1