diff options
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 | ||
