Skip to content

Commit

Permalink
dist_get: handle 404 correctly
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
kpcyrd committed Apr 26, 2017
1 parent 213358b commit 49b90a0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/dist_get
Original file line number Diff line number Diff line change
Expand Up @@ -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."
}
Expand Down

0 comments on commit 49b90a0

Please sign in to comment.