aboutsummaryrefslogtreecommitdiff
path: root/2022/get
diff options
context:
space:
mode:
Diffstat (limited to '2022/get')
-rwxr-xr-x2022/get16
1 files changed, 16 insertions, 0 deletions
diff --git a/2022/get b/2022/get
new file mode 100755
index 0000000..48f39d6
--- /dev/null
+++ b/2022/get
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+source "vars"
+INPUT_URL="https://adventofcode.com/${YEAR}/day/$((10#${DAY}))/input"
+
+mkdir "nim/day${DAY}"
+cp "main.nim" "nim/day${DAY}/main.nim"
+curl $INPUT_URL --cookie "session=${TOKEN}" > "nim/day${DAY}/input.txt"
+
+cargo new "rust/day${DAY}"
+cp "main.rs" "rust/day${DAY}/src/main.rs"
+cp "nim/day${DAY}/input.txt" "rust/day${DAY}/src/input.txt"
+
+subl -a "nim/day${DAY}/input.txt"
+subl -a "nim/day${DAY}/main.nim"
+chromium "https://adventofcode.com/${YEAR}/day/$((10#${DAY}))"