From acc2af44c9c385b5c9c0ebf3cfd21d9f09c8d254 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Tue, 14 Nov 2023 02:44:05 -0800 Subject: [PATCH] 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 :-) --- 1991/fine/try.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/1991/fine/try.sh b/1991/fine/try.sh index 652a60ad4..24edb2a8f 100755 --- a/1991/fine/try.sh +++ b/1991/fine/try.sh @@ -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