1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-07-01 02:30:39 +08:00

dist_get: handle 404 correctly

This prevents a 404 page getting piped into tar.

It's also adding the openbsd http(s) client `ftp`.

License: MIT
Signed-off-by: kpcyrd <git@rxv.cc>
This commit is contained in:
kpcyrd
2017-04-27 00:26:45 +02:00
parent 213358b1e4
commit 49b90a0754

View File

@ -44,9 +44,10 @@ download() {
fi
try_download "$dl_url" "$dl_output" "wget '$dl_url' -O '$dl_output'" && return
try_download "$dl_url" "$dl_output" "curl --silent '$dl_url' > '$dl_output'" && return
try_download "$dl_url" "$dl_output" "curl --silent --fail --output '$dl_output' '$dl_url'" && return
try_download "$dl_url" "$dl_output" "fetch '$dl_url' -o '$dl_output'" && return
try_download "$dl_url" "$dl_output" "http '$dl_url' > '$dl_output'" && return
try_download "$dl_url" "$dl_output" "ftp -o '$dl_output' '$dl_url'" && return
die "Unable to download $dl_url. exiting."
}