/ mirrors as own command
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user