From 871c5fc8f7cf2b6b839bdaca626281c71aead89d Mon Sep 17 00:00:00 2001 From: Dreaded_X Date: Sun, 3 Dec 2023 01:59:21 +0100 Subject: [PATCH] Fixed download script --- 2023/new.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/2023/new.sh b/2023/new.sh index fe0d3c3..bfc9682 100755 --- a/2023/new.sh +++ b/2023/new.sh @@ -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..." source ../.env 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!"