Improve 1991/fine/try.sh
Now allows one to pass in CC=foo. Default is 'cc'. ... let's just say the script is much finer now :-)
This commit is contained in:
1 parent
e71f9d61f7
commit
acc2af44c9
1 file changed
+11
-2
+11
-2
@@ -1,9 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# demo.sh - script to demonstrate IOCCC entry 1991/fine
|
||||
# try.sh - script to demonstrate IOCCC winner 1991/fine
|
||||
#
|
||||
|
||||
make all || 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" all >/dev/null || exit 1
|
||||
|
||||
# clear screen to remove any compiler message to make the entry stand out more
|
||||
clear
|
||||
|
||||
echo -n "Green terra <-> "
|
||||
echo "Green terra" | ./fine
|
||||
|
||||
Reference in new issue
Block a user