From: hayao Date: Sun, 25 Oct 2020 10:05:15 +0000 (+0900) Subject: [update] : Added commandlline help X-Git-Tag: rc3-alpha1~64 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=e2119922a0ae63993e91fbb16b61cf23f6d27548;p=alterlinux%2Falterlinux.git [update] : Added commandlline help --- diff --git a/tools/wizard.sh b/tools/wizard.sh index 81114a85..cc9d7892 100755 --- a/tools/wizard.sh +++ b/tools/wizard.sh @@ -71,8 +71,20 @@ getclm() { echo "$(cat -)" | cut -d " " -f "${1}" } +# 使い方 +_help() { + echo "usage ${0} [options]" + echo + echo " General options:" + echo " -a Specify the architecture" + echo " -e English" + echo " -j Japanese" + echo " -n Enable simulation mode" + echo " -x Enable bash debug" + echo " -h This help message" +} -while getopts 'a:xnje' arg; do +while getopts 'a:xnjeh' arg; do case "${arg}" in n) nobuild=true @@ -93,9 +105,17 @@ while getopts 'a:xnje' arg; do echo "日本語が設定されました" skip_set_lang=true ;; + h) + _help + exit 0 + ;; a) build_arch="${OPTARG}" ;; + *) + _help + exit 1 + ;; esac done