diff options
| author | Orfeas <38209077+0xfea5@users.noreply.github.com> | 2025-08-27 04:16:05 +0300 |
|---|---|---|
| committer | Orfeas <38209077+0xfea5@users.noreply.github.com> | 2025-09-01 04:51:37 +0300 |
| commit | d5c2821d589ef36f885bb4f92a6d6ca0bc4cc0e7 (patch) | |
| tree | 268b9c82a4f26dc009eb852fb5419cc44ab81f01 /init.sh | |
| parent | .gitignore: ignore binaries, lsp cache and compile_commands.json (diff) | |
| download | aoc24-d5c2821d589ef36f885bb4f92a6d6ca0bc4cc0e7.tar.gz aoc24-d5c2821d589ef36f885bb4f92a6d6ca0bc4cc0e7.zip | |
Add ‘skel/‘ as template directory for each day
Diffstat (limited to 'init.sh')
| -rwxr-xr-x | init.sh | 4 |
1 files changed, 1 insertions, 3 deletions
| @@ -13,11 +13,9 @@ cookiefile=${3:-'./cookie'} | |||
| 13 | dir=$(printf "day%02d" $day) | 13 | dir=$(printf "day%02d" $day) |
| 14 | 14 | ||
| 15 | echo "Initializing directory $dir/" | 15 | echo "Initializing directory $dir/" |
| 16 | mkdir -p $dir | 16 | rsync -av --ignore-existing skel/ ${dir}/ |
| 17 | 17 | ||
| 18 | advent_session=$(cat $cookiefile 2> /dev/null) && | 18 | advent_session=$(cat $cookiefile 2> /dev/null) && |
| 19 | echo "Downloading input ..." && | 19 | echo "Downloading input ..." && |
| 20 | curl "https://adventofcode.com/$year/day/$day/input" \ | 20 | curl "https://adventofcode.com/$year/day/$day/input" \ |
| 21 | -H "Cookie: session=$advent_session" > $dir/input.txt | 21 | -H "Cookie: session=$advent_session" > $dir/input.txt |
| 22 | |||
| 23 | exit 0 | ||
