Fixed download script

This commit is contained in:
Dreaded_X 2023-12-03 01:59:21 +01:00
parent 30cd70bce9
commit 871c5fc8f7
Signed by: Dreaded_X
GPG Key ID: FA5F485356B0D2D4

View File

@ -10,6 +10,7 @@ sed -e "s/DAY/$day/g" -e "s/TYPE/$type/" -e "s/DEFAULT/$default/" -e "s/TEST/$te
echo "Downloading input..." echo "Downloading input..."
source ../.env source ../.env
mkdir -p input/$1 mkdir -p input/$1
curl -s "https://adventofcode.com/2023/day/$1/input" -H "Cookie: session=${SESSION}" > input/$1/input day=$(echo $1 | sed 's/^0*//')
curl -s "https://adventofcode.com/2023/day/$day/input" -H "Cookie: session=${SESSION}" > input/$1/input
echo "Done!" echo "Done!"