diff options
author | Leah Neukirchen <leah@vuxu.org> | 2020-01-31 15:55:37 +0100 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2020-01-31 15:55:37 +0100 |
commit | 289055301db8c7bf26eaf47228e0747c69623bfd (patch) | |
tree | 3dfc94353392844903159c8af46ebef9635c12c2 | |
parent | 6dee0885b727f7f8da484ce5eda5599024a671de (diff) | |
download | mewix-289055301db8c7bf26eaf47228e0747c69623bfd.tar.gz mewix-289055301db8c7bf26eaf47228e0747c69623bfd.tar.xz mewix-289055301db8c7bf26eaf47228e0747c69623bfd.zip |
lib1: disable incremental downloads, keep full copies only
curl -f returns status 1 with code 416, which many servers send when the file is loaded completely already.
-rw-r--r-- | lib1.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib1.sh b/lib1.sh index a54f6d3..5881a9a 100644 --- a/lib1.sh +++ b/lib1.sh @@ -3,7 +3,11 @@ set -e pre_fetch() { :; } do_fetch() { cd /cache - curl -L -f -C - -O $distfiles + for f in $distfiles; do + [ -f "${f##*/}" ] && continue + curl -L -f -o fetch.$$ $f + mv fetch.$$ ${f##*/} + done } post_fetch() { :; } |