Improve 1992/nathan/try.sh
Allow one to specify CC=foo, defaulting to cc.
This commit is contained in:
1 parent
649239f3fa
commit
0d90372331
1 file changed
+12
@@ -1,5 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# 1992/nathan/try.sh - show IOCCC winner 1992/nathan
|
||||
|
||||
# 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
|
||||
|
||||
echo "$ ./nathan obfuscate < nathan.c > foobarf.c" 1>&2
|
||||
./nathan obfuscate < nathan.c > foobarf.c
|
||||
|
||||
Reference in new issue
Block a user