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 8953c52..f221174 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