From afa56835c48220bbf1c813052e82d7b3cf1e1ef7 Mon Sep 17 00:00:00 2001 From: Mika Suhonen Date: Sun, 1 Dec 2024 06:19:15 +0200 Subject: [PATCH] make getpuzzle generic --- utils/getpuzzle.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/utils/getpuzzle.sh b/utils/getpuzzle.sh index 9155b6d..163717a 100755 --- a/utils/getpuzzle.sh +++ b/utils/getpuzzle.sh @@ -1,8 +1,9 @@ #!/bin/bash source "$(dirname "$0")/../.env" -day=$(date +%-d) +year=$1 +day=$2 -echo "Getting input for day $day" +echo "Getting input for $year day $day" -curl -s -S --cookie "$COOKIE" --output ./input.txt https://adventofcode.com/2024/day/$day/input +curl -s -S --cookie "$COOKIE" --output ./input.txt https://adventofcode.com/$year/day/$day/input