From ea4d465a541437282f1ef5239623473538d30f17 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Fri, 19 Jan 2024 09:32:49 -0800 Subject: [PATCH] Improve 2000/tomx/try scripts --- 2000/tomx/try.alt.sh | 30 +++++++++++++++++++++--------- 2000/tomx/try.sh | 41 ++++++++++++++++++++++++++++------------- 2 files changed, 49 insertions(+), 22 deletions(-) diff --git a/2000/tomx/try.alt.sh b/2000/tomx/try.alt.sh index 0ffb04090..114925294 100755 --- a/2000/tomx/try.alt.sh +++ b/2000/tomx/try.alt.sh @@ -16,21 +16,33 @@ make CC="$CC" alt >/dev/null || exit 1 clear echo "Using tomx.alt.c to compile mkentry.c directly:" 1>&2 -echo "$ chmod +x tomx.alt.c" 1>&2 +read -r -n 1 -p "Press any key to run: chmod +x tomx.alt.c: " +echo 1>&2 chmod +x tomx.alt.c -echo "$ rm -f mkentry" 1>&2 -rm -f mkentry -echo "$ ./tomx.alt.c" 1>&2 +echo 1>&2 + +read -r -n 1 -p "Press any key to run: rm -vf mkentry: " +echo 1>&2 +rm -vf mkentry +echo 1>&2 + +read -r -n 1 -p "Press any key to run: ./tomx.alt.c: " +echo 1>&2 ./tomx.alt.c echo 1>&2 echo "Using tomx.alt.c as a Makefile to compile mkentry.c:" 1>&2 -echo "$ rm -f mkentry" -rm mkentry -echo "$ make -f tomx.alt.c" 1>&2 +read -r -n 1 -p "Press any key to run: rm -vf mkentry: " +echo 1>&2 +rm -vf mkentry +echo 1>&2 + +read -r -n 1 -p "Press any key to run: make -f tomx.alt.c: " +echo 1>&2 make -f tomx.alt.c echo 1>&2 -echo "Running mkentry via tomx.alt:" 1>&2 -echo "$ ./tomx.alt" 1>&2 +read -r -n 1 -p "Press any key to run: ./tomx.alt: " +echo 1>&2 ./tomx.alt +echo 1>&2 diff --git a/2000/tomx/try.sh b/2000/tomx/try.sh index 82e9dcdc8..5d3a0aeb6 100755 --- a/2000/tomx/try.sh +++ b/2000/tomx/try.sh @@ -15,28 +15,43 @@ make CC="$CC" all >/dev/null || exit 1 # clear screen after compilation so that only the entry is shown clear -echo "Running tomx:" 1>&2 -echo "$ ./tomx" 1>&2 +read -r -n 1 -p "Press any key to run: ./tomx: " +echo 1>&2 ./tomx echo 1>&2 echo "Using source code to compile tomx.c: " 1>&2 -echo "$ rm -f tomx" 1>&2 -rm -f tomx -echo "$ chmod +x tomx.c" 1>&2 +read -r -n 1 -p "Press any key to run: rm -vf tomx: " +echo 1>&2 +rm -vf tomx +echo 1>&2 + +read -r -n 1 -p "Press any key to run: chmod +x tomx.c: " +echo 1>&2 chmod +x tomx.c -echo "$ ./tomx.c" 1>&2 +echo 1>&2 + +read -r -n 1 -p "Press any key to run: ./tomx.c: " +echo 1>&2 ./tomx.c -echo "Running tomx again:" 1>&2 -echo "$ ./tomx" 1>&2 +echo 1>&2 +read -r -n 1 -p "Press any key to run: ./tomx (a second time): " +echo 1>&2 ./tomx echo 1>&2 echo "Using tomx.c as a Makefile:" 1>&2 -echo "$ rm -f tomx" 1>&2 -rm -f tomx -echo "$ make -f tomx.c" 1>&2 +read -r -n 1 -p "Press any key to run: rm -vf tomx: " +echo 1>&2 +rm -vf tomx +echo 1>&2 + +read -r -n 1 -p "Press any key to run: make -f tomx.c: " +echo 1>&2 make -f tomx.c -echo "Running tomx again:" 1>&2 -echo "$ ./tomx" +echo 1>&2 + +read -r -n 1 -p "Press any key to run: ./tomx (a third time): " +echo 1>&2 ./tomx +echo 1>&2