aboutsummaryrefslogtreecommitdiff
path: root/aoc
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2025-12-01 11:33:53 +0100
committerSebastiano Tronto <sebastiano@tronto.net>2025-12-01 11:33:53 +0100
commit7557d3b9071af21512af55c0a79da00197463abf (patch)
tree9e7322ee9f1a983ceb874747741ce415706b5d44 /aoc
parent180c2f5ad008eebbb0ac99a846d0524ff2c2e02e (diff)
downloadscripts-7557d3b9071af21512af55c0a79da00197463abf.tar.gz
scripts-7557d3b9071af21512af55c0a79da00197463abf.zip
aoc: only download puzzle input if file is not present
Diffstat (limited to '')
-rwxr-xr-xaoc6
1 files changed, 4 insertions, 2 deletions
diff --git a/aoc b/aoc
index 56da404..13b89e7 100755
--- a/aoc
+++ b/aoc
@@ -19,8 +19,10 @@ daynozero="$(echo "$day" | sed 's/^0//')"
19cd "$basedir/$year/$day" 19cd "$basedir/$year/$day"
20 20
21# Download the puzzle input and save it to input.txt 21# Download the puzzle input and save it to input.txt
22url="https://adventofcode.com/$year/day/$daynozero/input" 22if [ ! -e input.txt ]; then
23curl "$url" -H "cookie: session=$AOC_SESSION_COOKIE" -o input.txt 23 url="https://adventofcode.com/$year/day/$daynozero/input"
24 curl "$url" -H "cookie: session=$AOC_SESSION_COOKIE" -o input.txt
25fi
24 26
25# Open a tmux session with lynx in its own windows, and an editor and a 27# Open a tmux session with lynx in its own windows, and an editor and a
26# terminal in split view. 28# terminal in split view.

Generated with cgit - Back to sebastiano.tronto.net