summaryrefslogtreecommitdiff
path: root/tcwg_kernel-build.sh
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2018-11-14 14:17:03 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2018-11-26 10:44:43 +0000
commitd993e2699ac3a33a416bba0058f5bda8158fa309 (patch)
tree459ca47930d1f640110227f89f7dc9efd39f71b6 /tcwg_kernel-build.sh
parent1aa722d8a8ff64bf600154a966321e994e4d012d (diff)
Don't ignore "null" values in variable expansions
Replace ${var:-default} with ${var-default}. I learned something new about shell scripting today. From bash manual: === When not performing substring expansion, using the form described below (e.g., ‘:-’), Bash tests for a parameter that is unset or null. Omitting the colon results in a test only for a parameter that is unset. Put another way, if the colon is included, the operator tests for both parameter’s existence and that its value is not null; if the colon is omitted, the operator tests only for existence. === The immediate problem I need to fix is handling of host_aarchXX_excludecheck and host_x86_64_excludecheck parameters in tcwg-buildfarm.sh. With ":-" syntax the empty ("null") values are replaced by defaults, causing GCC testsuite to be ignored on aarchXX hosts when "--host_aarchXX_excludecheck ''" is given. There happens to be a single usage ":-" in ${rw:-rw} in start-container-qemu.sh, where ":-" is actually needed. Change-Id: Ibc8e070b698e1c76e2161eb65d40639b8cdec1f3
Diffstat (limited to 'tcwg_kernel-build.sh')
-rwxr-xr-xtcwg_kernel-build.sh26
1 files changed, 13 insertions, 13 deletions
diff --git a/tcwg_kernel-build.sh b/tcwg_kernel-build.sh
index f9ba98b0..c67b7ca4 100755
--- a/tcwg_kernel-build.sh
+++ b/tcwg_kernel-build.sh
@@ -12,7 +12,7 @@ declare -A git_branch
convert_args_to_variables "@@gnu-default" "@@llvm-default" "@@linux-default" "$@"
# Execution mode: baseline, jenkins-full, bisect.
-mode="${mode:-baseline}"
+mode="${mode-baseline}"
# Toolchain to use: gnu or llvm
obligatory_variables toolchain
@@ -25,18 +25,18 @@ esac
# Set custom revision for one of the projects, and use baseline revisions
# for all other projects.
-current_project="${current_project:-none}"
-current_rev="${current_rev:-default}"
-
-linux_config="${linux_config:-defconfig}"
-reset_baseline="${reset_baseline:-false}"
-start_at="${start_at:-default}"
-finish_at="${finish_at:-default}"
-target="${target:-native}"
-tidy="${tidy:-true}"
-top_artifacts="${top_artifacts:-$(pwd)/artifacts}"
-verbose="${verbose:-true}"
-verbose2="${verbose2:-false}"
+current_project="${current_project-none}"
+current_rev="${current_rev-default}"
+
+linux_config="${linux_config-defconfig}"
+reset_baseline="${reset_baseline-false}"
+start_at="${start_at-default}"
+finish_at="${finish_at-default}"
+target="${target-native}"
+tidy="${tidy-true}"
+top_artifacts="${top_artifacts-$(pwd)/artifacts}"
+verbose="${verbose-true}"
+verbose2="${verbose2-false}"
set -u