diff options
| author | Orfeas Chatzipanagiotis <csd4366@csd.uoc.gr> | 2022-12-08 05:45:14 +0200 |
|---|---|---|
| committer | Orfeas Chatzipanagiotis <csd4366@csd.uoc.gr> | 2022-12-09 11:57:39 +0200 |
| commit | 52123945a7bf2d627f3000add96d30f46c6f48b8 (patch) | |
| tree | bdf168e85a030b96fd610d11293039f4f1907bc3 /init.sh | |
| parent | Day 2 (diff) | |
| download | aoc22-52123945a7bf2d627f3000add96d30f46c6f48b8.tar.gz aoc22-52123945a7bf2d627f3000add96d30f46c6f48b8.zip | |
Day 3,4
Diffstat (limited to 'init.sh')
| -rwxr-xr-x | init.sh | 15 |
1 files changed, 15 insertions, 0 deletions
| @@ -0,0 +1,15 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | source ../cookie.sh | ||
| 3 | |||
| 4 | if [ $# -eq 0 ] | ||
| 5 | then | ||
| 6 | echo "No arguments provided." | ||
| 7 | exit 1 | ||
| 8 | fi | ||
| 9 | |||
| 10 | DAY=$1 | ||
| 11 | DIR="day$DAY" | ||
| 12 | echo "Initializing day $DAY in directory $DIR" | ||
| 13 | |||
| 14 | mkdir -p $DIR && curl "https://adventofcode.com/2022/day/$DAY/input" -H "Cookie: session=$ADVENT_SESSION" > $DIR/input.txt | ||
| 15 | touch $DIR/solution.nim | ||
