fix logic bug in new input curl
This commit is contained in:
parent
056ac16cf1
commit
fb73d56bd5
2
new.sh
2
new.sh
@ -5,7 +5,7 @@ __year=2021
|
|||||||
if [ "${1}" != "" ]; then
|
if [ "${1}" != "" ]; then
|
||||||
padded=$(printf "%02g" ${1})
|
padded=$(printf "%02g" ${1})
|
||||||
mkdir -p ${padded}/inputs
|
mkdir -p ${padded}/inputs
|
||||||
touch ${padded}/inputs/{input,testinput}
|
touch ${padded}/inputs/testinput
|
||||||
if [ ! -f "${padded}/inputs/input" ]; then
|
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 -H "Cookie: session=`cat .cookie`" https://adventofcode.com/${__year}/day/${1##0}/input > "${padded}/inputs/input"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user