Improve 2011/dlowe/try.sh
Get CC, defaulting to cc.
This commit is contained in:
1 parent
44580dc3d4
commit
3eeec10b5a
1 file changed
+16
-1
+16
-1
@@ -1,6 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# try.sh - demonstrate IOCCC winner 2011/dlowe
|
||||
#
|
||||
|
||||
make clobber dlowe || 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
|
||||
|
||||
# in this case we won't fail if we can't compile the code because we can still
|
||||
# run the supplementary program.
|
||||
make CC="$CC" all >/dev/null
|
||||
|
||||
# clear screen after compilation so that only the entry is shown
|
||||
clear
|
||||
|
||||
./dlowe dlowe.c < dlowe-aux-data/ioccc-winlose-trained.net
|
||||
./dlowe dlowe < dlowe-aux-data/ioccc-winlose-trained.net
|
||||
|
||||
Reference in new issue
Block a user