chiark / gitweb /
src/cross.in: Check for `ccache' correctly.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 19 Jul 2020 22:40:44 +0000 (23:40 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 19 Jul 2020 22:40:44 +0000 (23:40 +0100)
Apparently dash(1) thinks `type' on its own is successful, which is why
it seemed to work for me.

src/cross.in

index 8953c529d43a19b7586ad0c9c43f3a7a44475ce8..f22117438b2c880d561727416e69016919235937 100644 (file)
@@ -14,7 +14,7 @@ if ! [ -f "$CROSSDIR/etc/$env-setup.sh" ]; then
   echo 2>&1 "${0##*/}: cross environment \`$env' unknown"; exit 2
 fi
 
-if type >/dev/null 2>&1; then CROSS_COMPILER_PREFIX="ccache "
+if type ccache >/dev/null 2>&1; then CROSS_COMPILER_PREFIX="ccache "
 else CROSS_COMPILER_PREFIX=
 fi
 export CROSS_COMPILER_PREFIX