diff --git a/2001/anonymous/try.sh b/2001/anonymous/try.sh index fc509fca7..71330cfc5 100755 --- a/2001/anonymous/try.sh +++ b/2001/anonymous/try.sh @@ -1,7 +1,21 @@ #!/usr/bin/env bash +# +# try.sh - demonstrate IOCCC winner 2001/anonymous +# -make clobber alt all >/dev/null 2>&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" everything >/dev/null + +# clear screen after compilation so that only the entry is shown +clear TARGET="anonymous.ten" if [[ -f "$TARGET" ]]; then @@ -28,6 +42,7 @@ if [[ -f "$TARGET" ]]; then else echo "cannot compile anonymous.ten.c as 32-bit, sorry." echo "will run 64-bit version directly." + make anonymous.ten.64 sleep 3 echo "$ ./$TARGET.64" ./"$TARGET".64