From 4b08755e4a98f4568fa9591f9a2664fdd7eca0cb Mon Sep 17 00:00:00 2001 From: Anthony Howe Date: Sun, 3 Aug 2025 11:59:17 -0400 Subject: [PATCH 1/2] Fix all try.sh scripts to be more portable WRT gmake vs make. --- 2024/burton/try.sh | 3 ++- 2024/cable1/try.sh | 3 ++- 2024/cable2/try.sh | 3 ++- 2024/carlini/try.sh | 3 ++- 2024/codemeow/try.sh | 3 ++- 2024/endoh1/try.sh | 3 ++- 2024/endoh2/try.sh | 3 ++- 2024/ferguson1/try.sh | 3 ++- 2024/ferguson2/try.sh | 3 ++- 2024/kramer/try.sh | 3 ++- 2024/kurdyukov1/try.sh | 3 ++- 2024/kurdyukov2/try.sh | 3 ++- 2024/kurdyukov3/try.alt.sh | 3 ++- 2024/kurdyukov3/try.sh | 3 ++- 2024/kurdyukov4/try.sh | 3 ++- 2024/macke/try.sh | 3 ++- 2024/maffiodo/try.sh | 3 ++- 2024/mills/try.alt.sh | 3 ++- 2024/mills/try.sh | 3 ++- 2024/stedolan/try.sh | 3 ++- 2024/straadt/try.sh | 3 ++- 2024/tmarrec/try.sh | 3 ++- 2024/tompng/try.sh | 3 ++- 2024/weaver/try.sh | 3 ++- 24 files changed, 48 insertions(+), 24 deletions(-) diff --git a/2024/burton/try.sh b/2024/burton/try.sh index 8bdb99321..d4f1ca085 100755 --- a/2024/burton/try.sh +++ b/2024/burton/try.sh @@ -9,7 +9,8 @@ # make sure the program has been built # -make CC="$CC" all >/dev/null || exit 1 +MAKE=$(which gmake) +${MAKE:=make} CC="$CC" all >/dev/null || exit 1 # clear the screen # diff --git a/2024/cable1/try.sh b/2024/cable1/try.sh index 3dca4d0ec..ccb561ff0 100755 --- a/2024/cable1/try.sh +++ b/2024/cable1/try.sh @@ -25,7 +25,8 @@ fi # read -r -n 1 -p "Press any key to when ready: " echo 1>&2 -make CC="$CC" all >/dev/null || exit 1 +MAKE=$(which gmake) +${MAKE:=make} CC="$CC" all >/dev/null || exit 1 # select a game # diff --git a/2024/cable2/try.sh b/2024/cable2/try.sh index c128f948f..c0b8e0fe7 100755 --- a/2024/cable2/try.sh +++ b/2024/cable2/try.sh @@ -9,7 +9,8 @@ # make sure the program has been built # -make CC="$CC" all >/dev/null || exit 1 +MAKE=$(which gmake) +${MAKE:=make} CC="$CC" all >/dev/null || exit 1 # clear the screen # diff --git a/2024/carlini/try.sh b/2024/carlini/try.sh index 2b48dcfbf..3c00f5421 100755 --- a/2024/carlini/try.sh +++ b/2024/carlini/try.sh @@ -11,7 +11,8 @@ fi # make sure the program has been built # -make CC="$CC" all >/dev/null || exit 1 +MAKE=$(which gmake) +${MAKE:=make} CC="$CC" all >/dev/null || exit 1 # clear the screen # diff --git a/2024/codemeow/try.sh b/2024/codemeow/try.sh index 0c514451e..bf271253d 100755 --- a/2024/codemeow/try.sh +++ b/2024/codemeow/try.sh @@ -9,7 +9,8 @@ # make sure the program has been built # -make CC="$CC" all >/dev/null || exit 1 +MAKE=$(which gmake) +${MAKE:=make} CC="$CC" all >/dev/null || exit 1 # clear the screen # diff --git a/2024/endoh1/try.sh b/2024/endoh1/try.sh index 9946c08ce..4e158f796 100755 --- a/2024/endoh1/try.sh +++ b/2024/endoh1/try.sh @@ -12,7 +12,8 @@ fi # make sure the program has been built # -make CC="$CC" all >/dev/null || exit 1 +MAKE=$(which gmake) +${MAKE:=make} CC="$CC" all >/dev/null || exit 1 # clear the screen diff --git a/2024/endoh2/try.sh b/2024/endoh2/try.sh index 669609fae..171a64d12 100755 --- a/2024/endoh2/try.sh +++ b/2024/endoh2/try.sh @@ -9,7 +9,8 @@ # make sure the program has been built # -make CC="$CC" all tipple >/dev/null || exit 1 +MAKE=$(which gmake) +${MAKE:=make} CC="$CC" all tipple >/dev/null || exit 1 # clear the screen # diff --git a/2024/ferguson1/try.sh b/2024/ferguson1/try.sh index 4f659fb09..61bc56df0 100755 --- a/2024/ferguson1/try.sh +++ b/2024/ferguson1/try.sh @@ -9,7 +9,8 @@ # make sure the program has been built # -make CC="$CC" all >/dev/null || exit 1 +MAKE=$(which gmake) +${MAKE:=make} CC="$CC" all >/dev/null || exit 1 # clear the screen # diff --git a/2024/ferguson2/try.sh b/2024/ferguson2/try.sh index 228cc8bf5..aeb7339fa 100755 --- a/2024/ferguson2/try.sh +++ b/2024/ferguson2/try.sh @@ -9,7 +9,8 @@ # make sure the program and the alt program have been built # -make CC="$CC" everything >/dev/null || exit 1 +MAKE=$(which gmake) +${MAKE:=make} CC="$CC" everything >/dev/null || exit 1 # clear the screen # diff --git a/2024/kramer/try.sh b/2024/kramer/try.sh index ad467175f..ab48ff2bb 100755 --- a/2024/kramer/try.sh +++ b/2024/kramer/try.sh @@ -9,7 +9,8 @@ # make sure the program and the alt program have been built # -make CC="$CC" everything >/dev/null || exit 1 +MAKE=$(which gmake) +${MAKE:=make} CC="$CC" everything >/dev/null || exit 1 # clear the screen # diff --git a/2024/kurdyukov1/try.sh b/2024/kurdyukov1/try.sh index 7aefd4dd4..4963fe394 100755 --- a/2024/kurdyukov1/try.sh +++ b/2024/kurdyukov1/try.sh @@ -9,7 +9,8 @@ # make sure the program has been built # -make CC="$CC" all >/dev/null || exit 1 +MAKE=$(which gmake) +${MAKE:=make} CC="$CC" all >/dev/null || exit 1 # clear the screen # diff --git a/2024/kurdyukov2/try.sh b/2024/kurdyukov2/try.sh index f1e348c2f..3cfb16b44 100755 --- a/2024/kurdyukov2/try.sh +++ b/2024/kurdyukov2/try.sh @@ -9,7 +9,8 @@ # make sure the program has been built # -make CC="$CC" all >/dev/null || exit 1 +MAKE=$(which gmake) +${MAKE:=make} CC="$CC" all >/dev/null || exit 1 # clear the screen # diff --git a/2024/kurdyukov3/try.alt.sh b/2024/kurdyukov3/try.alt.sh index d94c75c1a..2cc05ac90 100755 --- a/2024/kurdyukov3/try.alt.sh +++ b/2024/kurdyukov3/try.alt.sh @@ -9,7 +9,8 @@ # make sure the program has been built # -make CC="$CC" alt >/dev/null || exit 1 +MAKE=$(which gmake) +${MAKE:=make} CC="$CC" alt >/dev/null || exit 1 # clear the screen # diff --git a/2024/kurdyukov3/try.sh b/2024/kurdyukov3/try.sh index 709506a10..13814aa42 100755 --- a/2024/kurdyukov3/try.sh +++ b/2024/kurdyukov3/try.sh @@ -9,7 +9,8 @@ # make sure the program has been built # -make CC="$CC" all >/dev/null || exit 1 +MAKE=$(which gmake) +${MAKE:=make} CC="$CC" all >/dev/null || exit 1 # clear the screen # diff --git a/2024/kurdyukov4/try.sh b/2024/kurdyukov4/try.sh index 90d5b6319..7b274b47c 100755 --- a/2024/kurdyukov4/try.sh +++ b/2024/kurdyukov4/try.sh @@ -9,7 +9,8 @@ # make sure the program and the alt program have been built # -make CC="$CC" everything >/dev/null || exit 1 +MAKE=$(which gmake) +${MAKE:=make} CC="$CC" everything >/dev/null || exit 1 # clear the screen # diff --git a/2024/macke/try.sh b/2024/macke/try.sh index 19320fb81..9ac90a077 100755 --- a/2024/macke/try.sh +++ b/2024/macke/try.sh @@ -9,7 +9,8 @@ # make sure the program has been built # -make CC="$CC" all >/dev/null || exit 1 +MAKE=$(which gmake) +${MAKE:=make} CC="$CC" all >/dev/null || exit 1 # clear the screen # diff --git a/2024/maffiodo/try.sh b/2024/maffiodo/try.sh index cca586133..7e49db273 100755 --- a/2024/maffiodo/try.sh +++ b/2024/maffiodo/try.sh @@ -9,7 +9,8 @@ # make sure the program and the alt program have been built # -make CC="$CC" everything >/dev/null || exit 1 +MAKE=$(which gmake) +${MAKE:=make} CC="$CC" everything >/dev/null || exit 1 # clear the screen # diff --git a/2024/mills/try.alt.sh b/2024/mills/try.alt.sh index 9c7bb968c..794bba2d7 100755 --- a/2024/mills/try.alt.sh +++ b/2024/mills/try.alt.sh @@ -9,7 +9,8 @@ # make sure the program has been built # -make CC="$CC" alt >/dev/null || exit 1 +MAKE=$(which gmake) +${MAKE:=make} CC="$CC" alt >/dev/null || exit 1 # clear the screen # diff --git a/2024/mills/try.sh b/2024/mills/try.sh index f29175689..52d77eca0 100755 --- a/2024/mills/try.sh +++ b/2024/mills/try.sh @@ -9,7 +9,8 @@ # make sure the program has been built # -make CC="$CC" all >/dev/null || exit 1 +MAKE=$(which gmake) +${MAKE:=make} CC="$CC" all >/dev/null || exit 1 # clear the screen # diff --git a/2024/stedolan/try.sh b/2024/stedolan/try.sh index abbe58bb1..fe682b4dd 100755 --- a/2024/stedolan/try.sh +++ b/2024/stedolan/try.sh @@ -9,7 +9,8 @@ # make sure the program has been built # -make CC="$CC" all >/dev/null || exit 1 +MAKE=$(which gmake) +${MAKE:=make} CC="$CC" all >/dev/null || exit 1 # clear the screen # diff --git a/2024/straadt/try.sh b/2024/straadt/try.sh index 4487bd220..ce6667398 100755 --- a/2024/straadt/try.sh +++ b/2024/straadt/try.sh @@ -9,7 +9,8 @@ # make sure the program has been built # -make CC="$CC" all >/dev/null || exit 1 +MAKE=$(which gmake) +${MAKE:=make} CC="$CC" all >/dev/null || exit 1 # clear the screen # diff --git a/2024/tmarrec/try.sh b/2024/tmarrec/try.sh index 1300ff5eb..971d74ff2 100755 --- a/2024/tmarrec/try.sh +++ b/2024/tmarrec/try.sh @@ -9,7 +9,8 @@ # make sure the program has been built # -make CC="$CC" all >/dev/null || exit 1 +MAKE=$(which gmake) +${MAKE:=make} CC="$CC" all >/dev/null || exit 1 # clear the screen # diff --git a/2024/tompng/try.sh b/2024/tompng/try.sh index 3cda237c8..75c832d74 100755 --- a/2024/tompng/try.sh +++ b/2024/tompng/try.sh @@ -11,7 +11,8 @@ fi # make sure the program has been built # -make CC="$CC" all >/dev/null || exit 1 +MAKE=$(which gmake) +${MAKE:=make} CC="$CC" all >/dev/null || exit 1 # clear the screen # diff --git a/2024/weaver/try.sh b/2024/weaver/try.sh index 6ce8b38b7..3733ab166 100755 --- a/2024/weaver/try.sh +++ b/2024/weaver/try.sh @@ -9,7 +9,8 @@ # make sure the program has been built # -make CC="$CC" all >/dev/null || exit 1 +MAKE=$(which gmake) +${MAKE:=make} CC="$CC" all >/dev/null || exit 1 # clear the screen # From 40f2141aefd09756c75136a161805b597f5a9f43 Mon Sep 17 00:00:00 2001 From: Anthony Howe Date: Sun, 3 Aug 2025 13:13:55 -0400 Subject: [PATCH 2/2] Fix try.sh scripts; use `command(1)` instead of `which`. --- 2024/burton/try.sh | 2 +- 2024/cable1/try.sh | 2 +- 2024/cable2/try.sh | 2 +- 2024/carlini/try.sh | 2 +- 2024/codemeow/try.sh | 2 +- 2024/endoh1/try.sh | 2 +- 2024/endoh2/try.sh | 2 +- 2024/ferguson1/try.sh | 2 +- 2024/ferguson2/try.sh | 2 +- 2024/howe/try.sh | 2 +- 2024/kramer/try.sh | 2 +- 2024/kurdyukov1/try.sh | 2 +- 2024/kurdyukov2/try.sh | 2 +- 2024/kurdyukov3/try.alt.sh | 2 +- 2024/kurdyukov3/try.sh | 2 +- 2024/kurdyukov4/try.sh | 2 +- 2024/macke/try.sh | 2 +- 2024/maffiodo/try.sh | 2 +- 2024/mills/try.alt.sh | 2 +- 2024/mills/try.sh | 2 +- 2024/stedolan/try.sh | 2 +- 2024/straadt/try.sh | 2 +- 2024/tmarrec/try.sh | 2 +- 2024/tompng/try.sh | 2 +- 2024/weaver/try.sh | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/2024/burton/try.sh b/2024/burton/try.sh index d4f1ca085..ecf8de5cf 100755 --- a/2024/burton/try.sh +++ b/2024/burton/try.sh @@ -9,7 +9,7 @@ # make sure the program has been built # -MAKE=$(which gmake) +MAKE=$(command -v gmake) ${MAKE:=make} CC="$CC" all >/dev/null || exit 1 # clear the screen diff --git a/2024/cable1/try.sh b/2024/cable1/try.sh index ccb561ff0..6cb1c3383 100755 --- a/2024/cable1/try.sh +++ b/2024/cable1/try.sh @@ -25,7 +25,7 @@ fi # read -r -n 1 -p "Press any key to when ready: " echo 1>&2 -MAKE=$(which gmake) +MAKE=$(command -v gmake) ${MAKE:=make} CC="$CC" all >/dev/null || exit 1 # select a game diff --git a/2024/cable2/try.sh b/2024/cable2/try.sh index c0b8e0fe7..460792b19 100755 --- a/2024/cable2/try.sh +++ b/2024/cable2/try.sh @@ -9,7 +9,7 @@ # make sure the program has been built # -MAKE=$(which gmake) +MAKE=$(command -v gmake) ${MAKE:=make} CC="$CC" all >/dev/null || exit 1 # clear the screen diff --git a/2024/carlini/try.sh b/2024/carlini/try.sh index 3c00f5421..836c1781c 100755 --- a/2024/carlini/try.sh +++ b/2024/carlini/try.sh @@ -11,7 +11,7 @@ fi # make sure the program has been built # -MAKE=$(which gmake) +MAKE=$(command -v gmake) ${MAKE:=make} CC="$CC" all >/dev/null || exit 1 # clear the screen diff --git a/2024/codemeow/try.sh b/2024/codemeow/try.sh index bf271253d..bc3384705 100755 --- a/2024/codemeow/try.sh +++ b/2024/codemeow/try.sh @@ -9,7 +9,7 @@ # make sure the program has been built # -MAKE=$(which gmake) +MAKE=$(command -v gmake) ${MAKE:=make} CC="$CC" all >/dev/null || exit 1 # clear the screen diff --git a/2024/endoh1/try.sh b/2024/endoh1/try.sh index 4e158f796..34cfa5a84 100755 --- a/2024/endoh1/try.sh +++ b/2024/endoh1/try.sh @@ -12,7 +12,7 @@ fi # make sure the program has been built # -MAKE=$(which gmake) +MAKE=$(command -v gmake) ${MAKE:=make} CC="$CC" all >/dev/null || exit 1 diff --git a/2024/endoh2/try.sh b/2024/endoh2/try.sh index 171a64d12..4955ef10e 100755 --- a/2024/endoh2/try.sh +++ b/2024/endoh2/try.sh @@ -9,7 +9,7 @@ # make sure the program has been built # -MAKE=$(which gmake) +MAKE=$(command -v gmake) ${MAKE:=make} CC="$CC" all tipple >/dev/null || exit 1 # clear the screen diff --git a/2024/ferguson1/try.sh b/2024/ferguson1/try.sh index 61bc56df0..9b46c763c 100755 --- a/2024/ferguson1/try.sh +++ b/2024/ferguson1/try.sh @@ -9,7 +9,7 @@ # make sure the program has been built # -MAKE=$(which gmake) +MAKE=$(command -v gmake) ${MAKE:=make} CC="$CC" all >/dev/null || exit 1 # clear the screen diff --git a/2024/ferguson2/try.sh b/2024/ferguson2/try.sh index aeb7339fa..e920e6f04 100755 --- a/2024/ferguson2/try.sh +++ b/2024/ferguson2/try.sh @@ -9,7 +9,7 @@ # make sure the program and the alt program have been built # -MAKE=$(which gmake) +MAKE=$(command -v gmake) ${MAKE:=make} CC="$CC" everything >/dev/null || exit 1 # clear the screen diff --git a/2024/howe/try.sh b/2024/howe/try.sh index 7748aa188..cce9b6fef 100755 --- a/2024/howe/try.sh +++ b/2024/howe/try.sh @@ -9,7 +9,7 @@ if [[ -z "$CC" ]]; then CC="cc" fi -MAKE=$(which gmake) +MAKE=$(command -v gmake) ${MAKE:=make} CC="$CC" all >/dev/null || exit 1 read -r -n 1 -p "Press any key to form foo: " diff --git a/2024/kramer/try.sh b/2024/kramer/try.sh index ab48ff2bb..2c67a2f9a 100755 --- a/2024/kramer/try.sh +++ b/2024/kramer/try.sh @@ -9,7 +9,7 @@ # make sure the program and the alt program have been built # -MAKE=$(which gmake) +MAKE=$(command -v gmake) ${MAKE:=make} CC="$CC" everything >/dev/null || exit 1 # clear the screen diff --git a/2024/kurdyukov1/try.sh b/2024/kurdyukov1/try.sh index 4963fe394..f0efa497e 100755 --- a/2024/kurdyukov1/try.sh +++ b/2024/kurdyukov1/try.sh @@ -9,7 +9,7 @@ # make sure the program has been built # -MAKE=$(which gmake) +MAKE=$(command -v gmake) ${MAKE:=make} CC="$CC" all >/dev/null || exit 1 # clear the screen diff --git a/2024/kurdyukov2/try.sh b/2024/kurdyukov2/try.sh index 3cfb16b44..e3ec8cf0e 100755 --- a/2024/kurdyukov2/try.sh +++ b/2024/kurdyukov2/try.sh @@ -9,7 +9,7 @@ # make sure the program has been built # -MAKE=$(which gmake) +MAKE=$(command -v gmake) ${MAKE:=make} CC="$CC" all >/dev/null || exit 1 # clear the screen diff --git a/2024/kurdyukov3/try.alt.sh b/2024/kurdyukov3/try.alt.sh index 2cc05ac90..7dbb3bf3c 100755 --- a/2024/kurdyukov3/try.alt.sh +++ b/2024/kurdyukov3/try.alt.sh @@ -9,7 +9,7 @@ # make sure the program has been built # -MAKE=$(which gmake) +MAKE=$(command -v gmake) ${MAKE:=make} CC="$CC" alt >/dev/null || exit 1 # clear the screen diff --git a/2024/kurdyukov3/try.sh b/2024/kurdyukov3/try.sh index 13814aa42..93e65d77f 100755 --- a/2024/kurdyukov3/try.sh +++ b/2024/kurdyukov3/try.sh @@ -9,7 +9,7 @@ # make sure the program has been built # -MAKE=$(which gmake) +MAKE=$(command -v gmake) ${MAKE:=make} CC="$CC" all >/dev/null || exit 1 # clear the screen diff --git a/2024/kurdyukov4/try.sh b/2024/kurdyukov4/try.sh index 7b274b47c..f196862d7 100755 --- a/2024/kurdyukov4/try.sh +++ b/2024/kurdyukov4/try.sh @@ -9,7 +9,7 @@ # make sure the program and the alt program have been built # -MAKE=$(which gmake) +MAKE=$(command -v gmake) ${MAKE:=make} CC="$CC" everything >/dev/null || exit 1 # clear the screen diff --git a/2024/macke/try.sh b/2024/macke/try.sh index 9ac90a077..92cf806dc 100755 --- a/2024/macke/try.sh +++ b/2024/macke/try.sh @@ -9,7 +9,7 @@ # make sure the program has been built # -MAKE=$(which gmake) +MAKE=$(command -v gmake) ${MAKE:=make} CC="$CC" all >/dev/null || exit 1 # clear the screen diff --git a/2024/maffiodo/try.sh b/2024/maffiodo/try.sh index 7e49db273..7c084924f 100755 --- a/2024/maffiodo/try.sh +++ b/2024/maffiodo/try.sh @@ -9,7 +9,7 @@ # make sure the program and the alt program have been built # -MAKE=$(which gmake) +MAKE=$(command -v gmake) ${MAKE:=make} CC="$CC" everything >/dev/null || exit 1 # clear the screen diff --git a/2024/mills/try.alt.sh b/2024/mills/try.alt.sh index 794bba2d7..21d80fa04 100755 --- a/2024/mills/try.alt.sh +++ b/2024/mills/try.alt.sh @@ -9,7 +9,7 @@ # make sure the program has been built # -MAKE=$(which gmake) +MAKE=$(command -v gmake) ${MAKE:=make} CC="$CC" alt >/dev/null || exit 1 # clear the screen diff --git a/2024/mills/try.sh b/2024/mills/try.sh index 52d77eca0..90ae0b556 100755 --- a/2024/mills/try.sh +++ b/2024/mills/try.sh @@ -9,7 +9,7 @@ # make sure the program has been built # -MAKE=$(which gmake) +MAKE=$(command -v gmake) ${MAKE:=make} CC="$CC" all >/dev/null || exit 1 # clear the screen diff --git a/2024/stedolan/try.sh b/2024/stedolan/try.sh index fe682b4dd..6eee1393a 100755 --- a/2024/stedolan/try.sh +++ b/2024/stedolan/try.sh @@ -9,7 +9,7 @@ # make sure the program has been built # -MAKE=$(which gmake) +MAKE=$(command -v gmake) ${MAKE:=make} CC="$CC" all >/dev/null || exit 1 # clear the screen diff --git a/2024/straadt/try.sh b/2024/straadt/try.sh index ce6667398..38cbbea5c 100755 --- a/2024/straadt/try.sh +++ b/2024/straadt/try.sh @@ -9,7 +9,7 @@ # make sure the program has been built # -MAKE=$(which gmake) +MAKE=$(command -v gmake) ${MAKE:=make} CC="$CC" all >/dev/null || exit 1 # clear the screen diff --git a/2024/tmarrec/try.sh b/2024/tmarrec/try.sh index 971d74ff2..6e89e8229 100755 --- a/2024/tmarrec/try.sh +++ b/2024/tmarrec/try.sh @@ -9,7 +9,7 @@ # make sure the program has been built # -MAKE=$(which gmake) +MAKE=$(command -v gmake) ${MAKE:=make} CC="$CC" all >/dev/null || exit 1 # clear the screen diff --git a/2024/tompng/try.sh b/2024/tompng/try.sh index 75c832d74..f2945f5de 100755 --- a/2024/tompng/try.sh +++ b/2024/tompng/try.sh @@ -11,7 +11,7 @@ fi # make sure the program has been built # -MAKE=$(which gmake) +MAKE=$(command -v gmake) ${MAKE:=make} CC="$CC" all >/dev/null || exit 1 # clear the screen diff --git a/2024/weaver/try.sh b/2024/weaver/try.sh index 3733ab166..05af4566e 100755 --- a/2024/weaver/try.sh +++ b/2024/weaver/try.sh @@ -9,7 +9,7 @@ # make sure the program has been built # -MAKE=$(which gmake) +MAKE=$(command -v gmake) ${MAKE:=make} CC="$CC" all >/dev/null || exit 1 # clear the screen