Improve 2004/schnitzi/try.sh

It also now checks that vi is installed (for the unlikely case it's not
installed).
This commit is contained in:
Cody Boone Ferguson committed 2024-01-20 10:47:22 -08:00
1 parent 195759bf03
commit b622a68af8
2 files changed
+14 -5

No files matched your search

+12 -5
View File
@@ -15,12 +15,19 @@ make CC="$CC" all >/dev/null || exit 1
# clear screen after compilation so that only the entry is shown
clear
# check for vi in the unlikely case it's not installed
#
if [[ -z "$(type -P vi)" ]]; then
echo "$0: vi not installed, cannot proceed." 1>&2
exit 1
fi
echo "$ ./schnitzi <schnitzi.inp0 | vi -n" 1>&2
read -r -n 1 -p "Press any key to run: ./schnitzi <schnitzi.inp0 | vi -n: "
echo 1>&2
./schnitzi <schnitzi.inp0 | vi -n
echo 1>&2
read -r -n 1 -p "Press any key to continue: "
echo
echo "$ ./schnitzi <schnitzi.inp1 | vi -n" 1>&2
read -r -n 1 -p "Press any key to run: ./schnitzi <schnitzi.inp1 | vi -n: "
echo 1>&2
./schnitzi <schnitzi.inp1 | vi -n
echo 1>&2
+2
View File
@@ -3081,6 +3081,8 @@ He also changed the time factor in the data files as the animations went too
fast in modern systems, especially the scrolling text of
[schnitzi.inp1](schnitzi.inp1).
Cody also added the [try.sh](/2004/schnitzi/try.sh) script.
## <a name="2004_sds"></a>[2004/sds](/2004/sds/sds.c) ([README.md](/2004/sds/README.md))