From 38f158b30d4901cfbe595464e18a414d0554e58b Mon Sep 17 00:00:00 2001 From: setop Date: Wed, 11 Dec 2024 12:43:26 +0100 Subject: [PATCH] chore(tools): fix parsed as octal --- cmd.txt | 2 ++ get_input.sh | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd.txt b/cmd.txt index cc01dcb..c02ed90 100644 --- a/cmd.txt +++ b/cmd.txt @@ -1 +1,3 @@ +. .venv/bin/activate +export PYTHONPATH=${PYTHONPATH:-$(realpath lib)} command cd "$(./get_input.sh)" && less input diff --git a/get_input.sh b/get_input.sh index 6c63bc5..f4f74ec 100755 --- a/get_input.sh +++ b/get_input.sh @@ -5,6 +5,7 @@ cd "$(dirname $(realpath $0))" . .env d=$(date +%d) +e=$(bc <<< "$d + 0") mkdir -p d${d} cd d${d} @@ -16,6 +17,6 @@ cd d${d} -H 'Connection: close' \ -H "Cookie: session=$SESSION" \ -o input \ - "https://adventofcode.com/2024/day/$(( $d + 0 ))/input" + "https://adventofcode.com/2024/day/$e/input" echo $(realpath .)