diff --git a/1996/westley/try.alt.sh b/1996/westley/try.alt.sh index 0adf8e87c..6c9e4c480 100755 --- a/1996/westley/try.alt.sh +++ b/1996/westley/try.alt.sh @@ -1,6 +1,19 @@ #!/usr/bin/env bash +# +# try.alt.sh - demonstrate IOCCC winner 1996/westley alt code +# -make everything 1>/dev/null || 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" everything >/dev/null || exit 1 + +# clear screen after compilation so that only the entry is shown +clear echo "Showing alt grandfather clock:" 1>&2 WESTLEY=./westley.alt ./clock1.sh diff --git a/1996/westley/try.sh b/1996/westley/try.sh index 8dea325ff..56cd8abe7 100755 --- a/1996/westley/try.sh +++ b/1996/westley/try.sh @@ -1,6 +1,19 @@ #!/usr/bin/env bash +# +# try.sh - demonstrate IOCCC winner 1996/westley +# -make everything 1>/dev/null || 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" everything >/dev/null || exit 1 + +# clear screen after compilation so that only the entry is shown +clear echo "Showing grandfather clock:" 1>&2 WESTLEY=./westley ./clock1.sh