Recognize -h and -? options to print out a usage message.
authorRaymond Toy <toy.raymond@gmail.com>
Thu, 7 Nov 2013 03:20:01 +0000 (19:20 -0800)
committerRaymond Toy <toy.raymond@gmail.com>
Thu, 7 Nov 2013 03:20:01 +0000 (19:20 -0800)
bin/create-target.sh

index 21b38a6..84c00c8 100755 (executable)
@@ -18,6 +18,19 @@ usage() {
 
 ##--
 prgm_name=`basename $0` bld_dir=$1 lisp_variant=$2 motif_variant=$3
+
+while getopts "h?" arg
+do
+    case $arg in
+      h) usage ;;
+      \?) usage ;;
+    esac
+done
+
+bld_dir=$1
+lisp_variant=$2
+motif_variant=$3
+
 exec 2>&1
 
 [ -n "$bld_dir" ] || usage