mirror of
https://github.com/eosswedenorg/antelope-keygen
synced 2026-07-03 11:53:41 +02:00
build.sh: fixing getopts.
This commit is contained in:
parent
2aaebdf5e2
commit
72a74fcb5a
1 changed files with 22 additions and 22 deletions
10
build.sh
10
build.sh
|
|
@ -4,11 +4,11 @@ mkdir build 2> /dev/null
|
||||||
pushd build > /dev/null
|
pushd build > /dev/null
|
||||||
|
|
||||||
function usage() {
|
function usage() {
|
||||||
echo "Usage: ${0##*/} [ -h ] [ -t Debug|Release|RelWithDebInfo|MinSizeRel ] [ --disable-threads ] [ --force-ansi ]"
|
echo "Usage: ${0##*/} [ -h|--help ] [ -t|--type Debug|Release|RelWithDebInfo|MinSizeRel ] [ --disable-threads ] [ --force-ansi ]"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
options=$(getopt -n "${0##*/}" -o lht: --long disable-threads --long force-ansi -- "$@")
|
options=$(getopt -n "${0##*/}" -o "lht:" -l "help,type:,disable-threads,force-ansi" -- "$@")
|
||||||
|
|
||||||
[ $? -eq 0 ] || usage
|
[ $? -eq 0 ] || usage
|
||||||
|
|
||||||
|
|
@ -18,8 +18,8 @@ ONLY_CONFIG=0
|
||||||
ARGS=""
|
ARGS=""
|
||||||
while true; do
|
while true; do
|
||||||
|
|
||||||
case "${1}" in
|
case $1 in
|
||||||
-t)
|
-t|--type)
|
||||||
shift
|
shift
|
||||||
[[ ! "$1" =~ ^(Debug|Release|RelWithDebInfo|MinSizeRel)$ ]] && {
|
[[ ! "$1" =~ ^(Debug|Release|RelWithDebInfo|MinSizeRel)$ ]] && {
|
||||||
echo "Incorrect type '$1' provided"
|
echo "Incorrect type '$1' provided"
|
||||||
|
|
@ -34,7 +34,7 @@ while true; do
|
||||||
-l)
|
-l)
|
||||||
ARGS="${ARGS} -LH"
|
ARGS="${ARGS} -LH"
|
||||||
ONLY_CONFIG=1 ;;
|
ONLY_CONFIG=1 ;;
|
||||||
-h) usage ;;
|
-h|--help) usage ;;
|
||||||
--) shift
|
--) shift
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue