aboutsummaryrefslogtreecommitdiff
path: root/util/two
diff options
context:
space:
mode:
Diffstat (limited to 'util/two')
-rwxr-xr-xutil/two7
1 files changed, 7 insertions, 0 deletions
diff --git a/util/two b/util/two
new file mode 100755
index 0000000..8dd0080
--- /dev/null
+++ b/util/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"