aboutsummaryrefslogtreecommitdiffstats
path: root/init.sh
blob: 86273e5edd6861c51686db1447ff202359f92f9f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh
source ../cookie.sh

if [ $# -eq 0 ]
then
  echo "No arguments provided."
  exit 1
fi

DAY=$1
DIR="day$DAY"
echo "Initializing day $DAY in directory $DIR"

mkdir -p $DIR && curl "https://adventofcode.com/2022/day/$DAY/input" -H "Cookie: session=$ADVENT_SESSION" > $DIR/input.txt
touch $DIR/solution.nim