summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-12-20 08:53:10 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2011-12-20 08:53:10 +0100
commit1187cc5c0a5afea749859d1acecdaae2a3bd9934 (patch)
treec01d971e9eb1ea8f1b4cfb26d8746cd4f57d8dc8
parentbea8577c43a065c0c3f8ecbd68daa426c91f166e (diff)
downloadabuild-1187cc5c0a5afea749859d1acecdaae2a3bd9934.tar.gz
abuild-1187cc5c0a5afea749859d1acecdaae2a3bd9934.tar.bz2
abuild-1187cc5c0a5afea749859d1acecdaae2a3bd9934.tar.xz
abuild-1187cc5c0a5afea749859d1acecdaae2a3bd9934.zip
abuild: fail fetch on http 404 errors
curl does not fail by default. it downloads the 404 error page instead so we need add -f option to curl.
-rwxr-xr-xabuild.in3
1 files changed, 2 insertions, 1 deletions
diff --git a/abuild.in b/abuild.in
index 51db163..4437877 100755
--- a/abuild.in
+++ b/abuild.in
@@ -242,6 +242,7 @@ wget_fallback() {
while getopts "C:Lko:s" opt; do
case $opt in
'L') ;; # --location. wget does this by default
+ 'f') ;; # --fail. wget does this by default
'C') wget_opts="$wget_opts -c";; # --continue-at
's') wget_opts="$wget_opts -q";; # --silent
'o') wget_opts="$wget_opts -O $OPTARG";; # --output
@@ -283,7 +284,7 @@ uri_fetch() {
fetcher=wget_fallback
else
fetcher=curl
- opts="$opts -L"
+ opts="$opts -L -f"
fi
$fetcher $opts -o "$SRCDEST/$d.part" "$uri" \