Commit 73d41b06 authored by Vitaly Lipatov's avatar Vitaly Lipatov

eget: add curl sget_with_mirrors for mirror fallback

parent d5f89be9
...@@ -1320,6 +1320,16 @@ url_pget() ...@@ -1320,6 +1320,16 @@ url_pget()
done done
} }
# Download file with mirror fallback (try each URL until success)
sget_with_mirrors()
{
local URL
for URL in "$@" ; do
__curl $CURLFILENAMEOPTIONS "$URL" && return 0
done
return 1
}
url_get_response() url_get_response()
{ {
local URL="$1" local URL="$1"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment