adventofcode-2021/prepare
Felix Van der Jeugt 4ed1792edd
capitals in scripts
2021-12-03 09:41:12 +01:00

15 lines
329 B
Bash
Executable File

#!/bin/sh
day="$1"
part="$2"
day="$(printf '%02d' "$day")"
if test -f "day${day}/part${part}.lua"; then
luac -o luac.out "day${day}/part${part}.lua"
printf '#!/bin/sh\nlua luac.out "$@"\n' > run
chmod u+x run
elif test -f "day${day}/part${part}.hs"; then
#stack build
stack ghc -- -O3 "day${day}/part${part}.hs" -o run
fi