tAdded long option: --help - scripts - various script and utils
(HTM) git clone git://z3bra.org/scripts
(DIR) Log
(DIR) Files
(DIR) Refs
---
(DIR) commit e03dc461221b69a28fc25676bc3e9bbe201e6dd8
(DIR) parent 935757d1416d2f850bbf733536a2e7ab8e23ec04
(HTM) Author: Willy Goiffon <w.goiffon@gmail.com>
Date: Tue, 24 Sep 2013 13:11:25 +0200
Added long option: --help
Diffstat:
M instagram | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
(DIR) diff --git a/instagram b/instagram
t@@ -18,12 +18,16 @@ Usage : instagram [-tmuh] [-g number] [-s screen] [filename.png]
Remember to add an extension at the end of the command
Also, do not give path to shot. They're saved to $SSHOT_DIR by default.
SHBLAH
+
+exit 0
}
function upload() {
~/bin/upload $1
}
+[[ "$1" = "--help" ]] && usage
+
while getopts ":htmud:g:s:" opt; do
case $opt in
t) THUMB=1 ;;
t@@ -32,7 +36,7 @@ while getopts ":htmud:g:s:" opt; do
g) GIF=$OPTARG ;;
s) SCREEN=$OPTARG ;;
u) UPLOAD=1 ;;
- h) usage; exit ;;
+ h) usage;;
?) echo "invalid option: -$OPTARG"; exit 1 ;;
esac
done