Improve 1998/tomtorfs/try.sh

Get CC, defaulting to cc.
This commit is contained in:
Cody Boone Ferguson committed 2023-11-14 04:07:22 -08:00
1 parent df5ceaa9f1
commit a2d34d6fcf
1 file changed
+13 -1
+13 -1
View File
@@ -1,8 +1,20 @@
#!/usr/bin/env bash
#
# script to demonstrate 1998/tomtorfs
# try.sh - demonstrate IOCCC winner 1998/tomtorfs
#
# 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" all >/dev/null || exit 1
# clear screen after compilation so that only the entry is shown
clear
rm -f file.A file.B file.C
echo "$ echo abscond conferrable > file.A" 1>&2