From 6f4e69da4c37caa9258da5a56a7a1a37e0ed0fc1 Mon Sep 17 00:00:00 2001 From: Axel Date: Thu, 1 Oct 2020 16:35:12 +0200 Subject: [PATCH] Fixed build script parsing arguments. --- Util/BuildTools/BuildCarlaUE4.sh | 2 +- Util/BuildTools/BuildLibCarla.sh | 2 +- Util/BuildTools/BuildOSM2ODR.sh | 5 +++-- Util/BuildTools/Deploy.sh | 2 +- Util/BuildTools/Plugins.sh | 4 ++-- Util/BuildTools/Prettify.sh | 2 +- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Util/BuildTools/BuildCarlaUE4.sh b/Util/BuildTools/BuildCarlaUE4.sh index f061132c4..371262e14 100755 --- a/Util/BuildTools/BuildCarlaUE4.sh +++ b/Util/BuildTools/BuildCarlaUE4.sh @@ -32,7 +32,7 @@ OPTS=`getopt -o h --long help,build,rebuild,launch,clean,hard-clean,gdb,opengl - eval set -- "$OPTS" -while true; do +while [[ $# -gt 0 ]]; do case "$1" in --gdb ) GDB="gdb --args"; diff --git a/Util/BuildTools/BuildLibCarla.sh b/Util/BuildTools/BuildLibCarla.sh index a8ad89c71..ea8162b96 100755 --- a/Util/BuildTools/BuildLibCarla.sh +++ b/Util/BuildTools/BuildLibCarla.sh @@ -45,7 +45,7 @@ OPTS=`getopt -o h --long help,rebuild,server,client,clean,debug,release,rss -n ' eval set -- "$OPTS" -while true; do +while [[ $# -gt 0 ]]; do case "$1" in --rebuild ) REMOVE_INTERMEDIATE=true; diff --git a/Util/BuildTools/BuildOSM2ODR.sh b/Util/BuildTools/BuildOSM2ODR.sh index 20aae9b57..ae20c4412 100755 --- a/Util/BuildTools/BuildOSM2ODR.sh +++ b/Util/BuildTools/BuildOSM2ODR.sh @@ -26,8 +26,8 @@ OPTS=`getopt -o h --long help,rebuild,build,clean -n 'parse-options' -- "$@"` eval set -- "$OPTS" -while true; do - case $1 in +while [[ $# -gt 0 ]]; do + case "$1" in --rebuild ) REMOVE_INTERMEDIATE=true; BUILD_OSM2ODR=true; @@ -44,6 +44,7 @@ while true; do exit 1 ;; * ) + log "Here22. $1" shift ;; esac done diff --git a/Util/BuildTools/Deploy.sh b/Util/BuildTools/Deploy.sh index 7958a7838..0083f8f8c 100755 --- a/Util/BuildTools/Deploy.sh +++ b/Util/BuildTools/Deploy.sh @@ -25,7 +25,7 @@ OPTS=`getopt -o h --long help,replace-latest,docker-push,dry-run -n 'parse-optio eval set -- "$OPTS" -while true; do +while [[ $# -gt 0 ]]; do case "$1" in --replace-latest ) REPLACE_LATEST=true; diff --git a/Util/BuildTools/Plugins.sh b/Util/BuildTools/Plugins.sh index aab127c0d..94154d04c 100755 --- a/Util/BuildTools/Plugins.sh +++ b/Util/BuildTools/Plugins.sh @@ -8,7 +8,7 @@ USAGE_STRING="Usage: $0 [-h|--help] [--release]" RELEASE=false -while true; do +while [[ $# -gt 0 ]]; do case "$1" in --release ) RELEASE=true @@ -19,7 +19,7 @@ while true; do exit 1 ;; * ) - break ;; + shift ;; esac done diff --git a/Util/BuildTools/Prettify.sh b/Util/BuildTools/Prettify.sh index 33a44e285..17668ca2e 100755 --- a/Util/BuildTools/Prettify.sh +++ b/Util/BuildTools/Prettify.sh @@ -21,7 +21,7 @@ OPTS=`getopt -o hf: --long help,all,file: -n 'parse-options' -- "$@"` eval set -- "$OPTS" -while true; do +while [[ $# -gt 0 ]]; do case "$1" in --all ) PRETTIFY_ALL=true;