You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
330 B
Bash
17 lines
330 B
Bash
3 years ago
|
#!/bin/bash
|
||
|
|
||
|
PARENT_DIR=$(dirname $PWD)
|
||
|
YEAR=${PARENT_DIR##*/}
|
||
|
DAY_RAW=${PWD##*/}
|
||
|
DAY=$((10#$DAY_RAW))
|
||
|
|
||
|
SESSION_KEY=$(cat ~/.aocrc)
|
||
|
|
||
|
echo "Fetching ${YEAR} ${DAY}"
|
||
|
echo $SESSION_KEY
|
||
|
|
||
|
curl -b session=$SESSION_KEY https://adventofcode.com/${YEAR}/day/${DAY}/input > input
|
||
|
|
||
|
echo "Visit: https://adventofcode.com/${YEAR}/day/${DAY}"
|
||
|
|