Commit 763d5946 authored by Vitaly Lipatov's avatar Vitaly Lipatov

eget: add aria2 sget_with_mirrors for simultaneous mirror download

parent 73d41b06
...@@ -1437,6 +1437,13 @@ url_pget() ...@@ -1437,6 +1437,13 @@ url_pget()
echo "$@" | xargs -n1 | download_with_mirroring __aria2 -i- echo "$@" | xargs -n1 | download_with_mirroring __aria2 -i-
} }
# Download file from multiple mirrors simultaneously (TAB-separated for aria2)
sget_with_mirrors()
{
# aria2 supports multiple URLs for same file separated by TAB
local tab_urls="$(echo "$@" | tr ' ' '\t')"
echo "$tab_urls" | __aria2 -i-
}
# use __wget for headers (aria2/axel don't support this natively) # use __wget for headers (aria2/axel don't support this natively)
url_get_response() url_get_response()
......
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