Commit d5f89be9 authored by Vitaly Lipatov's avatar Vitaly Lipatov

eget: add wget sget_with_mirrors for mirror fallback

parent 94d3de4c
...@@ -1213,6 +1213,16 @@ url_pget() ...@@ -1213,6 +1213,16 @@ url_pget()
download_with_mirroring __wget $WGETNAMEOPTIONS "$@" download_with_mirroring __wget $WGETNAMEOPTIONS "$@"
} }
# Download file with mirror fallback (try each URL until success)
sget_with_mirrors()
{
local URL
for URL in "$@" ; do
__wget $WGETNAMEOPTIONS "$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