be a good neighbor and set my user-agent header

https://www.reddit.com/r/adventofcode/comments/z9dhtd/please_include_your_contact_info_in_the_useragent/
This commit is contained in:
David 2022-12-01 08:07:30 -05:00
parent e66ea212ad
commit f23deb97e9
1 changed files with 3 additions and 1 deletions

4
new.sh
View File

@ -7,7 +7,9 @@ if [ "${1}" != "" ]; then
mkdir -p ${padded}/inputs
touch ${padded}/inputs/testinput
if [ ! -f "${padded}/inputs/input" ]; then
curl -s -H "Cookie: session=`cat .cookie`" https://adventofcode.com/${__year}/day/${1##0}/input > "${padded}/inputs/input"
curl -s \
-A "https://git.yetaga.in/alazyreader/AdventOfCode2022/" \
-H "Cookie: session=`cat .cookie`" https://adventofcode.com/${__year}/day/${1##0}/input > "${padded}/inputs/input"
fi
if [ ! -f "${padded}/main.rs" ]; then
cp -n main.rs.tmpl ${padded}/main.rs