Add version number, v0.1

This commit is contained in:
oblique 2015-03-13 19:55:20 +02:00
parent 04fa4860d1
commit d55adb7d50

View File

@ -13,6 +13,7 @@
# dnsmasq # dnsmasq
# iptables # iptables
VERSION=0.1
# make sure that all command outputs are in english # make sure that all command outputs are in english
# so we can parse them correctly # so we can parse them correctly
@ -23,6 +24,7 @@ usage() {
echo echo
echo "Options:" echo "Options:"
echo " -h, --help Show this help" echo " -h, --help Show this help"
echo " --version Print version number"
echo " -c <channel> Channel number (default: 1)" echo " -c <channel> Channel number (default: 1)"
echo " -w <WPA version> Use 1 for WPA, use 2 for WPA2, use 1+2 for both (default: 1+2)" echo " -w <WPA version> Use 1 for WPA, use 2 for WPA2, use 1+2 for both (default: 1+2)"
echo " -n Disable Internet sharing (if you use this, don't pass" echo " -n Disable Internet sharing (if you use this, don't pass"
@ -572,7 +574,7 @@ trap "clean_exit" SIGINT
trap "clean_exit" SIGUSR1 trap "clean_exit" SIGUSR1
ARGS=( "$@" ) ARGS=( "$@" )
GETOPT_ARGS=$(getopt -o hc:w:g:dnm: -l "help","hidden","ieee80211n","ht_capab:","driver:","no-virt","fix-unmanaged","country:","freq-band:","mac:","daemon","stop:","list" -n $(basename $0) -- "$@") GETOPT_ARGS=$(getopt -o hc:w:g:dnm: -l "help","hidden","ieee80211n","ht_capab:","driver:","no-virt","fix-unmanaged","country:","freq-band:","mac:","daemon","stop:","list","version" -n $(basename $0) -- "$@")
[[ $? -ne 0 ]] && exit 1 [[ $? -ne 0 ]] && exit 1
eval set -- "$GETOPT_ARGS" eval set -- "$GETOPT_ARGS"
@ -582,6 +584,10 @@ while :; do
usage >&2 usage >&2
exit 1 exit 1
;; ;;
--version)
echo $VERSION
exit 0
;;
--hidden) --hidden)
shift shift
HIDDEN=1 HIDDEN=1