From f4df24ed60eaa970fbb128f400d79aabe3e667b8 Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Wed, 7 Dec 2022 06:54:30 +0100 Subject: [PATCH] only ask for testing repository one time --- usr/lib/archboot/installer/pacman.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/usr/lib/archboot/installer/pacman.sh b/usr/lib/archboot/installer/pacman.sh index 9eedc3f99..f38c6c309 100644 --- a/usr/lib/archboot/installer/pacman.sh +++ b/usr/lib/archboot/installer/pacman.sh @@ -60,16 +60,15 @@ select_mirror() { echo "Server = "${SYNC_URL}"" >> /etc/pacman.d/mirrorlist if [[ "${DOTESTING}" == "yes" ]]; then #shellcheck disable=SC2129 - 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 "^\[testing\]" && sed -i -e "s:#\[testing\]:\[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 } # dotesting() # enable testing repository on network install dotesting() { - DOTESTING="" - 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" + 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" } # check for updating complete environment with packages