From: Alexander Barton Date: Sat, 20 Dec 2014 14:57:00 +0000 (+0100) Subject: axify: Add usage information, better parse command line X-Git-Url: https://arthur.barton.de/gitweb/?p=ax-make.git;a=commitdiff_plain;h=c9bf0751627790137e25ff153d8739d2782244a5 axify: Add usage information, better parse command line --- diff --git a/scripts/axify b/scripts/axify index 9f82f16..56dd9d7 100755 --- a/scripts/axify +++ b/scripts/axify @@ -11,6 +11,28 @@ NAME=`basename "$0"` +Usage() { + echo "Usage: $NAME []" + echo + echo " Library directory. Default: current working directory." + echo + exit 2 +} + +while true; do + case "$1" in + "-"*) + Usage + ;; + *) + break + ;; + esac + shift +done + +[ $# -gt 1 ] && Usage + [ -n "$1" ] && LIB_D="$1" || LIB_D="." if [ -r "/usr/local/share/ax-make/Makefile.ax" ]; then