Files
ioccc/template/entry/try.sh.judging
T
Landon Curt Noll bccdcc5fd9 update next and template try scripts
With commit fd483c2bed, all
try scripts now use:

```
MAKE=$(command -v gmake)
${MAKE:=make} CC="$CC" all >/dev/null || exit 1
```

to find `gmake(1)` and if not `make(1)` to make.

This commit updates the next and template try scripts accordingly.
2025-08-03 11:38:04 -07:00

28 lines
528 B
Bash
Executable File

#!/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=$(command -v gmake)
${MAKE:=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