adventofcode-2021/prepare
Felix Van der Jeugt ef0775f5e2
OK POSIX
2021-12-09 09:59:57 +01:00

15 lines
312 B
Bash
Executable File

#!/bin/sh
day="$1"
part="$2"
day="$(printf '%02d' "${day##0}")"
if test -f "day${day}/part${part}.lua"; then
/usr/bin/env luajit -v >/dev/null
cp "day${day}/part${part}.lua" 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