don't run curl if file exists
This commit is contained in:
parent
9136ba20af
commit
c5dbac0e9c
8
new.sh
8
new.sh
@ -6,6 +6,10 @@ if [ "${1}" != "" ]; then
|
||||
padded=$(printf "%02g" ${1})
|
||||
mkdir -p ${padded}/inputs
|
||||
touch ${padded}/inputs/{input,testinput}
|
||||
curl -s -H "Cookie: session=`cat .cookie`" https://adventofcode.com/${__year}/day/${1##0}/input > "${padded}/inputs/input"
|
||||
cp -n main.go.tmpl ${padded}/main.go
|
||||
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
|
||||
if [ ! -f "${padded}/main.go" ]; then
|
||||
cp -n main.go.tmpl ${padded}/main.go
|
||||
fi
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user