summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Rosdahl <joel@rosdahl.net>2016-09-25 11:37:41 +0200
committerJoel Rosdahl <joel@rosdahl.net>2016-09-25 11:37:41 +0200
commit7988efc06a8cefdec02913f7b75e6e199df9cee4 (patch)
treee677abdffe936d12aaa8e3969d7f3a0f1d38ac64
parent98d4e17737337af503b34417a56a16d0ab7d3c19 (diff)
downloadccache-7988efc06a8cefdec02913f7b75e6e199df9cee4.tar.gz
test: Handle CC="gcc -std=gnu99" gracefully
Based on a suggestion by Eric Bavier.
-rwxr-xr-xtest.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/test.sh b/test.sh
index 6ca18c9b..b46feaad 100755
--- a/test.sh
+++ b/test.sh
@@ -3380,11 +3380,11 @@ upgrade
input_charset
"
-compiler_location=$(which $COMPILER)
+compiler_location=$(which $(echo "$COMPILER" | awk '{print $1}'))
if [ "$compiler_location" = "$COMPILER" ]; then
echo "Compiler: $COMPILER"
else
- echo "Compiler: $COMPILER ($(which $COMPILER))"
+ echo "Compiler: $COMPILER ($compiler_location)"
fi
echo "Compiler version: $($COMPILER --version | head -n 1)"
echo