summaryrefslogtreecommitdiff
path: root/tcwg-benchmark.sh
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@linaro.org>2017-07-12 07:15:24 +0000
committerChristophe Lyon <christophe.lyon@linaro.org>2017-07-12 10:47:16 +0000
commit89c3125997ee6e2e902d4e4232938bb9e9ac953d (patch)
treea3854661cb0f9ab8caef62b58c9474718568dccc /tcwg-benchmark.sh
parentf40c71ba66357c41e29df4be96fb0bf521cf733c (diff)
tcwg-benchmark.sh: Early exit if there is more than one compiler installed.
If we can find more tnan one compiler, we don't know which one to choose: exit with an error, so that the user can provide a single toolchain, rather than generating obscure errors later. Change-Id: Ic7203bdf346f5d4e8efc3900113fbe4dff3b6a8b
Diffstat (limited to 'tcwg-benchmark.sh')
-rwxr-xr-xtcwg-benchmark.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/tcwg-benchmark.sh b/tcwg-benchmark.sh
index ffbe9d9b..96d1bbf4 100755
--- a/tcwg-benchmark.sh
+++ b/tcwg-benchmark.sh
@@ -79,6 +79,10 @@ esac
case "$toolchain_url" in
"http://"*|"https://"*|"rsync://"*)
ccpath=$(find "$toolchaindir" -name "*-gcc")
+ if [ $(echo "$ccpath" | wc -w) -ne 1 ]; then
+ echo "ERROR: found more than one compiler: $ccpath"
+ exit 1
+ fi
ccprefix=$(echo "$ccpath" | sed -e 's/-gcc$/-/')
# Copy toolchain to the build container.
rsync -a --delete -e "ssh -p$build_container_port" "$toolchaindir/" "$build_container_host:$toolchaindir/"