Skip to content

Commit e211992

Browse files
committed
[update] : Added commandlline help
1 parent 4e2aef2 commit e211992

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

tools/wizard.sh

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,20 @@ getclm() {
7171
echo "$(cat -)" | cut -d " " -f "${1}"
7272
}
7373

74+
# 使い方
75+
_help() {
76+
echo "usage ${0} [options]"
77+
echo
78+
echo " General options:"
79+
echo " -a Specify the architecture"
80+
echo " -e English"
81+
echo " -j Japanese"
82+
echo " -n Enable simulation mode"
83+
echo " -x Enable bash debug"
84+
echo " -h This help message"
85+
}
7486

75-
while getopts 'a:xnje' arg; do
87+
while getopts 'a:xnjeh' arg; do
7688
case "${arg}" in
7789
n)
7890
nobuild=true
@@ -93,9 +105,17 @@ while getopts 'a:xnje' arg; do
93105
echo "日本語が設定されました"
94106
skip_set_lang=true
95107
;;
108+
h)
109+
_help
110+
exit 0
111+
;;
96112
a)
97113
build_arch="${OPTARG}"
98114
;;
115+
*)
116+
_help
117+
exit 1
118+
;;
99119
esac
100120
done
101121

0 commit comments

Comments
 (0)