aboutsummaryrefslogtreecommitdiff
path: root/util/get
blob: 8d9d43f3220d0616a4eff3e3f2016aeb98d457c5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash

source "vars"
INPUT_URL="https://adventofcode.com/${YEAR}/day/$((10#${DAY}))/input"

cp "main.nim" "nim/day${DAY}.nim"
cp "main.ml" "ocaml/day${DAY}.ml"
curl $INPUT_URL --cookie "session=${TOKEN}" > "input/day${DAY}.txt"

subl -a "input/day${DAY}.txt"
subl -a "nim/day${DAY}.nim"
xdg-open "https://adventofcode.com/${YEAR}/day/$((10#${DAY}))"