1
0
Fork 0

Add option to use mirror status

Using the mirror status when updating mirrors ranks them in order of
best synchronized to worst.
This commit is contained in:
Tom Willemse 2016-06-12 11:32:37 +02:00
parent bb87e64082
commit a5d3cbbe2c

View file

@ -5,6 +5,7 @@ url="https://www.archlinux.org/mirrorlist"
countries=("BE" "NL") countries=("BE" "NL")
protocols=("http" "https") protocols=("http" "https")
ip_versions=(4) ip_versions=(4)
use_mirror_status="on"
dest="/etc/pacman.d/mirrorlist" dest="/etc/pacman.d/mirrorlist"
# Functions # Functions
@ -30,8 +31,9 @@ function make-url ()
local countryparams=$(urlify country ${countries[@]}) local countryparams=$(urlify country ${countries[@]})
local protocolparams=$(urlify protocol ${protocols[@]}) local protocolparams=$(urlify protocol ${protocols[@]})
local ipparams=$(urlify ip_version ${ip_versions[@]}) local ipparams=$(urlify ip_version ${ip_versions[@]})
local statusparams=$(urlify use_mirror_status $use_mirror_status)
echo "${url}/?${countryparams}&${protocolparams}&${ipparams}" echo "${url}/?${countryparams}&${protocolparams}&${ipparams}&${statusparams}"
} }
# Load config file # Load config file