aboutsummaryrefslogtreecommitdiff
path: root/util/get
blob: 423dfcabd969daaf62124c999cafdbf6a0152475 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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}))"