AdventOfCode2021/new.sh

12 lines
331 B
Bash
Raw Normal View History

2021-11-30 23:51:56 +00:00
#!/bin/bash
__year=2021
2021-11-30 23:51:56 +00:00
if [ "${1}" != "" ]; then
padded=$(printf "%02g" ${1})
mkdir -p ${padded}/inputs
touch ${padded}/inputs/{input,testinput}
curl -s -H "Cookie: session=`cat .cookie`" https://adventofcode.com/${__year}/day/${1##0}/input > "${padded}/inputs/input"
cp -n main.go.tmpl ${padded}/main.go
2021-11-30 23:51:56 +00:00
fi