This commit is contained in:
Daniel Flanagan 2022-12-01 16:44:05 -06:00
parent c32122bf50
commit 9a45b6c817
Signed by: lytedev
GPG key ID: 5B2020A0F9921EF4

View file

@ -13,6 +13,7 @@ if [ -f "$f" ]; then
fi fi
url="https://adventofcode.com/$AOC_YEAR/day/$DAY/input" url="https://adventofcode.com/$AOC_YEAR/day/$DAY/input"
cookie="$(cat "$HOME/.advent-of-code-auth-cookie")" cookie="$(cat "$HOME/.advent-of-code-auth-cookie")"
mkdir -p "$(dirname "$f")"
if curl --fail-with-body -X GET "$url" -H "Cookie:$cookie" > "$f"; then if curl --fail-with-body -X GET "$url" -H "Cookie:$cookie" > "$f"; then
echo "Downloaded $url to $f" echo "Downloaded $url to $f"
exit 0 exit 0