summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRenato Golin <renato.golin@linaro.org>2017-05-23 20:56:34 +0100
committerRenato Golin <renato.golin@linaro.org>2017-05-23 20:56:34 +0100
commit37a0ea931a56157631af633d1d8ff3509dbd5fdb (patch)
treec10510abe51ceab95effafd488a274d69eb43c2e
parent3fdc901d16084f3292076c6e75614d0de2272a68 (diff)
tcwg-llvm-build.sh: Better validation of empty arguments
Change-Id: Ibfa165cc383e98b7ad11c7fcb88c2371c7d97fa0
-rwxr-xr-xtcwg-llvm-build.sh10
1 files changed, 2 insertions, 8 deletions
diff --git a/tcwg-llvm-build.sh b/tcwg-llvm-build.sh
index 97aa097d..545f3845 100755
--- a/tcwg-llvm-build.sh
+++ b/tcwg-llvm-build.sh
@@ -45,7 +45,7 @@ BRANCH="master"
# Command line parsing
while [ "$#" -gt 0 ]; do
ARG=$(echo "$1" | cut -d "=" -f 1)
- VAL=$(echo "$1" | cut -d "=" -f 2-)
+ VAL=$(echo "$1" | cut -s -d "=" -f 2-)
case "$ARG" in
--workspace)
if [ -d "$VAL" ]; then
@@ -146,13 +146,7 @@ while [ "$#" -gt 0 ]; do
fi
shift ;;
--cmakeflags)
- if [ "$VAL" != "" ]; then
- CMAKEFLAGS="$VAL"
- else
- echo "ERROR: CMake flags '$VAL' not valid"
- echo "Syntax: $SYN_CMAKEFLAGS"
- exit 1
- fi
+ CMAKEFLAGS="$VAL"
shift ;;
*)
echo "ERROR: Invalid argument '$1'"