AdventOfCode25/new.sh
2025-12-01 13:47:40 +01:00

7 lines
380 B
Bash
Executable file

curl https://adventofcode.com/$1/day/$2/input --cookie session=$(cat .session) > inputs/$1-$2
day=$(echo $1 | sed 's/..//')
year=$(printf %02d $2)
cp -n template.hs src/Day${day}${year}.hs
alias run="ghc -no-keep-hi-files -no-keep-o-files src/Day${day}${year}.hs -o out && cat inputs/$1-$2 | ./out && hyperfine --input inputs/$1-$2 -N --warmup 10 --runs 10 \"./out\" && rm out"