Improve 1996/westley/try.sh and try.alt.sh

Get CC, defaulting to cc.
This commit is contained in:
Cody Boone Ferguson committed 2023-11-14 04:00:17 -08:00
1 parent 6968ea1404
commit dbeda86c10
2 files changed
+28 -2

No files matched your search

+14 -1
View File
@@ -1,6 +1,19 @@
#!/usr/bin/env bash
#
# try.alt.sh - demonstrate IOCCC winner 1996/westley alt code
#
make everything 1>/dev/null || exit 1
# 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
make CC="$CC" everything >/dev/null || exit 1
# clear screen after compilation so that only the entry is shown
clear
echo "Showing alt grandfather clock:" 1>&2
WESTLEY=./westley.alt ./clock1.sh
+14 -1
View File
@@ -1,6 +1,19 @@
#!/usr/bin/env bash
#
# try.sh - demonstrate IOCCC winner 1996/westley
#
make everything 1>/dev/null || exit 1
# 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
make CC="$CC" everything >/dev/null || exit 1
# clear screen after compilation so that only the entry is shown
clear
echo "Showing grandfather clock:" 1>&2
WESTLEY=./westley ./clock1.sh