]> www.fi.muni.cz Git - aoc2021.git/blobdiff - get.sh
Auxilliary scripts
[aoc2021.git] / get.sh
diff --git a/get.sh b/get.sh
new file mode 100755 (executable)
index 0000000..a0d03f8
--- /dev/null
+++ b/get.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+DAY=`date +%e|sed 's/ //g'`
+FILE="$((2*DAY - 1))in.txt"
+COOKIE=`cat cookie`
+
+URL="https://adventofcode.com/2021/day/$DAY/input"
+echo "Stahuji $URL do $FILE"
+curl -q -b "$COOKIE" "$URL" --output "$FILE"