/ mirrors as own command

This commit is contained in:
committer@tuxwarrior
2025-05-27 08:11:53 -05:00
parent 377afe884f
commit bfca3f4971

View File

@@ -78,9 +78,6 @@ do_update() {
exit 1
fi
echo "UPDATE MIRRORS"
rate-mirrors --allow-root --protocol https arch | grep -v '^#' | sudo tee /etc/pacman.d/mirrorlist
# https://unix.stackexchange.com/questions/157328/how-can-i-remove-all-comments-from-a-file
sed '/^[[:blank:]]*#/d;s/#.*//' ${trg_file} > ${trg_file}.tmp
@@ -247,3 +244,14 @@ if [ ${operation} == "uninstall" ] ; then
pacman -Rns ${parameter}
fi
# -----
# update mirrors
# -----
if [ ${operation} == "mirrors" ] ; then
echo "Updating mirrors…"
rate-mirrors --allow-root --protocol https arch | grep -v '^#' | sudo tee /etc/pacman.d/mirrorlist
fi