add lua solution for day 0

This commit is contained in:
Felix Van der Jeugt 2021-11-30 22:49:02 +01:00
parent f4fa590833
commit 9aa652953c
No known key found for this signature in database
GPG key ID: 58B209295023754D
3 changed files with 14 additions and 2 deletions

View file

@ -4,7 +4,11 @@ part="$2"
day="$(printf '%02d' "$day")"
if test -f "Day${day}/Part${part}.hs"; then
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