summaryrefslogtreecommitdiffstats
path: root/bin/get-input
blob: 2d4a424a49511cd7b5517771e6e8ca7f2428909f (plain) (blame)
1
2
3
4
5
6
7
8
#!/bin/sh
set -eu

day=${1:-$(date +%-d)}
year=${2:-$(date +%Y)}

mkdir -p data/"$year"
curl -b "$(cat .cookie)" -s https://adventofcode.com/"$year"/day/"$day"/input >data/"$year"/"$day".txt