make/toolchain.sh

changeset 944
cc23aad6335e
parent 942
488178e3e328
--- a/make/toolchain.sh	Sun Nov 30 18:17:49 2025 +0100
+++ b/make/toolchain.sh	Sun Nov 30 21:12:00 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