aboutsummaryrefslogtreecommitdiff
path: root/util/get
diff options
context:
space:
mode:
authorj-james2022-12-01 03:01:41 +0000
committerj-james2022-12-01 03:01:41 +0000
commit5bb17e9fcf87a976c69dab9e6a73a42745b3d4ce (patch)
tree138bfc44e692d4c8890af11ec2f5816c2b461f27 /util/get
parent1ec309b88e176909dc3d72ecb715d6e2d68c2f3d (diff)
Move scripts to a util folder
Diffstat (limited to 'util/get')
-rwxr-xr-xutil/get17
1 files changed, 17 insertions, 0 deletions
diff --git a/util/get b/util/get
new file mode 100755
index 0000000..423dfca
--- /dev/null
+++ b/util/get
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+source "vars"
+INPUT_URL="https://adventofcode.com/${YEAR}/day/$((10#${DAY}))/input"
+
+mkdir "nim/day${DAY}"
+mkdir "nim/day${DAY}/src"
+cp "main.nim" "nim/day${DAY}/src/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}/input.txt"
+
+subl -a "nim/day${DAY}/input.txt"
+subl -a "nim/day${DAY}/src/main.nim"
+# chromium "https://adventofcode.com/${YEAR}/day/$((10#${DAY}))"