From 1b79bd29cd1c8369939e2d7c7536f3dae875c9a2 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Mon, 30 Jun 2025 21:45:55 -0700 Subject: [PATCH] add try.sh.judging for use in IOCCC judging final rounds --- template/entry/try.sh.judging | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 template/entry/try.sh.judging diff --git a/template/entry/try.sh.judging b/template/entry/try.sh.judging new file mode 100755 index 000000000..c24acf20d --- /dev/null +++ b/template/entry/try.sh.judging @@ -0,0 +1,26 @@ +#!/usr/bin/env bash +# +# try.sh - demonstrate YYYY/XXX + +# 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. +# +[[ -z "$CC" ]] && CC="cc" + +# make sure the program has been built +# +make CC="$CC" all >/dev/null || exit 1 + +# clear the screen +# +clear + +# try the program +# +# XXX - adjust args as needed +# +read -r -n 1 -p "Press any key to run: ./prog: " +echo 1>&2 +echo 1>&2 +./prog +echo 1>&2