Closed triffid closed 7 years ago
Hello again!
Thanks for your second contribution, which fixes the problem with partial downloads. I've pushed your change with very minor modifications:
I hope that my additions/changes are OK - if I messed something up, just let me know!
Looks lovely 👍 thanks!
curl can leave partial downloads after network errors and the script will not retry (despite -C -) due to
if ! -e $1
on the previous lineThis pullreq makes curl always retry, since we don't have upstream filesize information available to compare against
stat -c %s $1
Since curl returns error code 33 when the file is complete (claiming that server doesn't seem to support byte ranges), we trap this error, consider it a success, and continue