From 9a45b6c8171b5287cd1ce79a18a05faa40dbada0 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 1 Dec 2022 16:44:05 -0600 Subject: [PATCH] Mkdir --- 2022/rust/fetch_input.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/2022/rust/fetch_input.sh b/2022/rust/fetch_input.sh index 0855a9c..121ddfd 100755 --- a/2022/rust/fetch_input.sh +++ b/2022/rust/fetch_input.sh @@ -13,6 +13,7 @@ if [ -f "$f" ]; then fi url="https://adventofcode.com/$AOC_YEAR/day/$DAY/input" 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 echo "Downloaded $url to $f" exit 0