fix logic bug in new input curl

This commit is contained in:
David 2021-12-06 09:22:08 -05:00
parent 056ac16cf1
commit fb73d56bd5
1 changed files with 1 additions and 1 deletions

2
new.sh
View File

@ -5,7 +5,7 @@ __year=2021
if [ "${1}" != "" ]; then
padded=$(printf "%02g" ${1})
mkdir -p ${padded}/inputs
touch ${padded}/inputs/{input,testinput}
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"
fi