mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-19 19:40:37 +02:00
show countrycode
This commit is contained in:
parent
baff5c9748
commit
90dfc73037
2 changed files with 2 additions and 2 deletions
|
@ -15,7 +15,7 @@ _hwclock() {
|
|||
_timezone () {
|
||||
_SET_ZONE=""
|
||||
if ping -c1 www.google.com &>/dev/null; then
|
||||
_ZONE="$(curl -s http://ip-api.com/csv/?fields=timezone)"
|
||||
_ZONE="$(curl -s "http://ip-api.com/csv/?fields=timezone")"
|
||||
_SET_ZONE=1
|
||||
fi
|
||||
while [[ -z "${_SET_ZONE}" ]]; do
|
||||
|
|
|
@ -8,7 +8,7 @@ _select_mirror() {
|
|||
## Download updated mirrorlist, if possible (only on x86_64)
|
||||
if [[ "${_RUNNING_ARCH}" == "x86_64" ]]; then
|
||||
_dialog --infobox "Downloading latest mirrorlist..." 3 40
|
||||
_COUNTRY="$(curl -s http://ip-api.com/csv/?fields=countryCode)"
|
||||
_COUNTRY="$(curl -s "http://ip-api.com/csv/?fields=countryCode")"
|
||||
${_DLPROG} "https://www.archlinux.org/mirrorlist/?country=${_COUNTRY}&protocol=https&ip_version=4&ip_version=6&use_mirror_status=on" -O /tmp/pacman_mirrorlist.txt
|
||||
if grep -q '#Server = https:' /tmp/pacman_mirrorlist.txt; then
|
||||
mv "${_MIRRORLIST}" "${_MIRRORLIST}.bak"
|
||||
|
|
Loading…
Reference in a new issue