aboutsummaryrefslogtreecommitdiff
path: root/2022/two
diff options
context:
space:
mode:
authorj-james2022-11-23 10:18:23 +0000
committerj-james2022-11-23 10:18:23 +0000
commit91b4352bb2563ae335732b0042c6e422414b6e1e (patch)
tree7be4e83cca72c56072a5c64e6c4fc3c6cf98a524 /2022/two
parent4cbdf16fbf2168feb6dc473f003e701623b75584 (diff)
Prepare scripts and templates for 2022
Diffstat (limited to '2022/two')
-rwxr-xr-x2022/two7
1 files changed, 7 insertions, 0 deletions
diff --git a/2022/two b/2022/two
new file mode 100755
index 0000000..8dd0080
--- /dev/null
+++ b/2022/two
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+source "vars"
+LEVEL="2"
+SUBMIT_URL="https://adventofcode.com/${YEAR}/day/$((10#${DAY}))/answer"
+
+curl $SUBMIT_URL --cookie "session=${TOKEN}" --data "level=${LEVEL}&answer=$1" | rg -C 1 "main"