From: Stefan Bund Date: Fri, 6 Nov 2009 12:57:21 +0000 (+0100) Subject: Add --version/-V command line option X-Git-Url: http://g0dil.de/git?p=mapsector.git;a=commitdiff_plain;h=9b845b7aba391d942bf17c2c298ce640ee31e3bd Add --version/-V command line option --- diff --git a/mapsector b/mapsector index a704e11..d3c2a72 100755 --- a/mapsector +++ b/mapsector @@ -67,7 +67,7 @@ load "$libdir" #### Parse command line arguments -X=`getopt -o "h" --long "help,noscan" -n "$name" -- "$@"` +X=`getopt -o "hV" --long "help,noscan,version" -n "$name" -- "$@"` if [ $? != 0 ]; then exit 1; fi eval set -- "$X" @@ -78,6 +78,7 @@ while true; do case "$1" in -h|--help) help="0"; shift ;; --noscan) noscan="0"; shift ;; + -V|--version) echo "$name $version"; exit 0 ;; --) shift; break ;; *) echo "! internal error"; exit 1 ;; esac