test/make/toolchain.sh

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

mercurial