Add 2015/endoh3/try.sh + format/typo checks

A new make rule (or alias for mullender and back_to) called 'future' was
added for the theme. The try.sh script uses make future ('back_to' just
doesn't look that good in my eyes even when I added it).

The try.sh tries to stay in character with the award theme a bit too
though that will only be noticeable if you pay attention. I found the
films very boring (though maybe years later I would find it more
enjoyable) so I'm sure that something more fun could have been
added if I knew them more but I do not. Well I tried anyway.
This commit is contained in:
Cody Boone Ferguson committed 2023-12-08 10:20:44 -08:00
1 parent 29903d763b
commit d9b2810392
4 files changed
+50 -10

No files matched your search

+36
View File
@@ -0,0 +1,36 @@
#!/usr/bin/env bash
#
# try.sh - demonstrate IOCCC winner 2015/endoh3
#
# make sure CC is set so that when we do make CC="$CC" it isn't empty. Doing it
# this way allows us to have the user specify a different compiler in an easy
# way.
if [[ -z "$CC" ]]; then
CC="cc"
fi
# clear screen so that only the entry is shown
clear
read -r -n 1 -p "Press any key to run: less -EXF prog.c (space = next page, q = quit): "
echo 1>&2
less -EXF prog.c
echo 1>&2
echo "$ make future" 1>&2
make future || exit 1
echo 1>&2
echo 1>&2
echo "Will go back to the future and run 1984/mullender through prog. To quit" 1>&2
echo "the program hit ctrl-c/intr." 1>&2
echo 1>&2
echo "You might want to try hitting enter or another key when the output reaches" 1>&2
echo "the end of the line." 1>&2
echo 1>&2
read -r -n 1 -p "Press any key to continue: "
echo 1>&2
echo "$ ./prog" 1>&2
./prog