adventofcode-2021/prepare
Felix Van der Jeugt 1f013dc0c3
zig does not read files?
This reverts commit d69c3ceb73.
2021-12-02 10:25:19 +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