From 289055301db8c7bf26eaf47228e0747c69623bfd Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Fri, 31 Jan 2020 15:55:37 +0100 Subject: 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. --- lib1.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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() { :; } -- cgit 1.4.1