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.
This commit is contained in:
parent
bea8577c43
commit
1187cc5c0a
|
@ -242,6 +242,7 @@ wget_fallback() {
|
||||||
while getopts "C:Lko:s" opt; do
|
while getopts "C:Lko:s" opt; do
|
||||||
case $opt in
|
case $opt in
|
||||||
'L') ;; # --location. wget does this by default
|
'L') ;; # --location. wget does this by default
|
||||||
|
'f') ;; # --fail. wget does this by default
|
||||||
'C') wget_opts="$wget_opts -c";; # --continue-at
|
'C') wget_opts="$wget_opts -c";; # --continue-at
|
||||||
's') wget_opts="$wget_opts -q";; # --silent
|
's') wget_opts="$wget_opts -q";; # --silent
|
||||||
'o') wget_opts="$wget_opts -O $OPTARG";; # --output
|
'o') wget_opts="$wget_opts -O $OPTARG";; # --output
|
||||||
|
@ -283,7 +284,7 @@ uri_fetch() {
|
||||||
fetcher=wget_fallback
|
fetcher=wget_fallback
|
||||||
else
|
else
|
||||||
fetcher=curl
|
fetcher=curl
|
||||||
opts="$opts -L"
|
opts="$opts -L -f"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$fetcher $opts -o "$SRCDEST/$d.part" "$uri" \
|
$fetcher $opts -o "$SRCDEST/$d.part" "$uri" \
|
||||||
|
|
Loading…
Reference in New Issue