Download with 16 aria2c connections by default
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1476b4a3de
commit
4eb26e3a96
1 file changed
+7
-6
+7
-6
@@ -139,8 +139,8 @@ Download one or more shared VM images. With no arguments, all targets are
|
|||||||
processed. The Debian/AlmaLinux/Fedora/Ubuntu image architecture (arm64 or amd64)
|
processed. The Debian/AlmaLinux/Fedora/Ubuntu image architecture (arm64 or amd64)
|
||||||
is auto-detected from the host; override it with VM_IMAGE_ARCH.
|
is auto-detected from the host; override it with VM_IMAGE_ARCH.
|
||||||
|
|
||||||
When aria2c is installed and an image has several mirrors, the image is
|
When aria2c is installed, an image is downloaded with 16 connections in total
|
||||||
downloaded from all of them at once, with one connection per mirror.
|
(DOWNLOAD_CONNECTIONS, up to 16), spread across all its mirrors if it has several.
|
||||||
Otherwise curl or wget downloads from the mirrors in order.
|
Otherwise curl or wget downloads from the mirrors in order.
|
||||||
|
|
||||||
The windows11 target is not part of "all". It downloads the Windows 11 ISO for
|
The windows11 target is not part of "all". It downloads the Windows 11 ISO for
|
||||||
@@ -305,16 +305,17 @@ download_single_source() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Download to $partial with aria2c, splitting the file across all URLs with a
|
# Download to $partial with aria2c, splitting the file across all URLs with up
|
||||||
# single connection to each server.
|
# to DOWNLOAD_CONNECTIONS (default 16) connections in total and to each server.
|
||||||
download_multi_source() {
|
download_multi_source() {
|
||||||
local partial="$1"
|
local partial="$1"
|
||||||
shift
|
shift
|
||||||
|
local connections="${DOWNLOAD_CONNECTIONS:-16}"
|
||||||
|
|
||||||
aria2c \
|
aria2c \
|
||||||
--continue=true \
|
--continue=true \
|
||||||
--split="$#" \
|
--split="$connections" \
|
||||||
--max-connection-per-server=1 \
|
--max-connection-per-server="$connections" \
|
||||||
--file-allocation=none \
|
--file-allocation=none \
|
||||||
--auto-file-renaming=false \
|
--auto-file-renaming=false \
|
||||||
--max-tries=5 \
|
--max-tries=5 \
|
||||||
|
|||||||
Reference in new issue
Block a user