/ mirrors as own command
This commit is contained in:
@@ -78,9 +78,6 @@ do_update() {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
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
|
# https://unix.stackexchange.com/questions/157328/how-can-i-remove-all-comments-from-a-file
|
||||||
sed '/^[[:blank:]]*#/d;s/#.*//' ${trg_file} > ${trg_file}.tmp
|
sed '/^[[:blank:]]*#/d;s/#.*//' ${trg_file} > ${trg_file}.tmp
|
||||||
|
|
||||||
@@ -247,3 +244,14 @@ if [ ${operation} == "uninstall" ] ; then
|
|||||||
pacman -Rns ${parameter}
|
pacman -Rns ${parameter}
|
||||||
|
|
||||||
fi
|
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