test/make/toolchain.sh

changeset 163
12a5e64cab34
parent 158
10c95fc02326
child 164
099448bcc943
--- a/test/make/toolchain.sh	Fri Nov 14 15:09:37 2025 +0100
+++ b/test/make/toolchain.sh	Sat Nov 29 12:18:10 2025 +0100
@@ -24,7 +24,8 @@
 
 check_c_compiler()
 {
-  if ! command -v "$1" >/dev/null 2>&1 ; then
+  command -v "$1" >/dev/null 2>&1
+  if [ $? -ne 0 ] ; then
     return 1
   fi
   cat > "$TEMP_DIR/test.c" << __EOF__
@@ -55,7 +56,8 @@
 
 check_cpp_compiler()
 {
-  if ! command -v "$1" >/dev/null 2>&1 ; then
+  command -v "$1" >/dev/null 2>&1
+  if [ $? -ne 0 ] ; then
     return 1
   fi
   cat > "$TEMP_DIR/test.cpp" << __EOF__

mercurial