only ask for testing repository one time

This commit is contained in:
Tobias Powalowski 2022-12-07 06:54:30 +01:00
parent bbbc2b2451
commit f4df24ed60

View file

@ -60,16 +60,15 @@ select_mirror() {
echo "Server = "${SYNC_URL}"" >> /etc/pacman.d/mirrorlist echo "Server = "${SYNC_URL}"" >> /etc/pacman.d/mirrorlist
if [[ "${DOTESTING}" == "yes" ]]; then if [[ "${DOTESTING}" == "yes" ]]; then
#shellcheck disable=SC2129 #shellcheck disable=SC2129
sed -i -e "s:#\[testing\]:\[testing\]\nInclude = /etc/pacman.d/mirrorlist:g" /etc/pacman.conf ! grep -q "^\[testing\]" && sed -i -e "s:#\[testing\]:\[testing\]\nInclude = /etc/pacman.d/mirrorlist:g" /etc/pacman.conf
sed -i -e "s:#\[community-testing\]:\[community-testing\]\nInclude = /etc/pacman.d/mirrorlist:g" /etc/pacman.conf ! grep -q "^\[community-testing\]" && sed -i -e "s:#\[community-testing\]:\[community-testing\]\nInclude = /etc/pacman.d/mirrorlist:g" /etc/pacman.conf
fi fi
} }
# dotesting() # dotesting()
# enable testing repository on network install # enable testing repository on network install
dotesting() { dotesting() {
DOTESTING="" DIALOG --defaultno --yesno "Do you want to enable [testing]\nand [community-testing] repositories?\n\nOnly enable this if you need latest\navailable packages for testing purposes!" 9 50 && DOTESTING="yes"
DIALOG --defaultno --yesno "Do you want to enable [testing]\nand [communtoy-testing] repositories?\n\nOnly enable this if you need latest\navailable packages for testing purposes!" 9 50 && DOTESTING="yes"
} }
# check for updating complete environment with packages # check for updating complete environment with packages