Sat, 29 Nov 2025 12:18:10 +0100
fix toolchain.sh compatibility with older shells
| src/main/resources/make/toolchain.sh | file | annotate | diff | comparison | revisions | |
| test/make/toolchain.sh | file | annotate | diff | comparison | revisions |
--- a/src/main/resources/make/toolchain.sh Fri Nov 14 15:09:37 2025 +0100 +++ b/src/main/resources/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__
--- 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__