replace with _PACMAN_MIRROR

This commit is contained in:
Tobias Powalowski 2024-02-25 16:41:49 +01:00
parent 07e92da841
commit df6fe865d1

View file

@ -49,9 +49,9 @@ _select_mirror() {
fi
echo "Using mirror: ${_SYNC_URL}" >"${_LOG}"
# comment already existing entries
sed -i -e 's|^Server|#Server|g' /etc/pacman.d/mirrorlist
sed -i -e 's|^Server|#Server|g' "${_PACMAN_MIRROR}"
#shellcheck disable=SC2027,SC2086
echo "Server = "${_SYNC_URL}"" >> /etc/pacman.d/mirrorlist
echo "Server = "${_SYNC_URL}"" >> "${_PACMAN_MIRROR}"
if ! pacman -Sy &>${_LOG}; then
_dialog --title " ERROR " --no-mouse --infobox "Your selected mirror is not working correctly, please configure again!" 3 75
sleep 3