summaryrefslogtreecommitdiffstats
path: root/abuild.in
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2018-10-03 09:23:16 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2018-10-03 09:23:16 +0000
commitc6609b4739bf45f76360f40c3be2f2b235f728bd (patch)
tree4f1d433890e655629851084305ed5b8efe16e1c0 /abuild.in
parent07d9f3bf6b97d7c8543a911a2ea02db4645c82e2 (diff)
downloadabuild-c6609b4739bf45f76360f40c3be2f2b235f728bd.tar.bz2
abuild-c6609b4739bf45f76360f40c3be2f2b235f728bd.tar.xz
move logic of curl's http range error to abuild-fetch
Move the logic of deleting partial downloads to abuild-fetch, which knows if it is curl or wget that was executed.
Diffstat (limited to 'abuild.in')
-rw-r--r--abuild.in13
1 files changed, 1 insertions, 12 deletions
diff --git a/abuild.in b/abuild.in
index 8f2af25..d52c0bf 100644
--- a/abuild.in
+++ b/abuild.in
@@ -332,20 +332,9 @@ sourcecheck() {
uri_fetch() {
local uri="$1"
- local status=0
mkdir -p "$SRCDEST"
msg "Fetching $uri"
- abuild-fetch -d "$SRCDEST" "$uri" || status=$?
-
- # try again when server does not support resume
- if [ "$status" -eq 33 ] && command -v curl > /dev/null; then
- local partfile="$SRCDEST/$(filename_from_uri $uri).part"
- msg "Removing partial download and trying again: $partfile"
- rm "$partfile"
- uri_fetch "$uri"
- else
- return $status
- fi
+ abuild-fetch -d "$SRCDEST" "$uri"
}
is_remote() {