]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
test: Handle CC="gcc -std=gnu99" gracefully
authorJoel Rosdahl <joel@rosdahl.net>
Sun, 25 Sep 2016 09:37:41 +0000 (11:37 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 25 Sep 2016 09:37:41 +0000 (11:37 +0200)
Based on a suggestion by Eric Bavier.

test.sh

diff --git a/test.sh b/test.sh
index 6ca18c9bf036a4e14b8252e92f8cb2b7cb751fe9..b46feaad36623b2fc37b2753e697316845175d29 100755 (executable)
--- 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