aoc/get_input.sh
2021-07-14 13:50:33 -07:00

16 lines
327 B
Bash
Executable File

#!/usr/bin/env bash
for year in {2015..2020}; do
mkdir -p $year/input
for day in {1..25}; do
if [[ day -lt 10 ]]; then
d="0$day"
else
d="$day"
fi
url="https://adventofcode.com/$year/day/$day/input"
curl --cookie "session=$1" $url | perl -pe 'chomp if eof' > $year/input/$d
done
touch $year/input/test
done