diff --git a/usr/lib/archboot/installer/pacman.sh b/usr/lib/archboot/installer/pacman.sh index 63fbd64d2..2d73f1ab3 100644 --- a/usr/lib/archboot/installer/pacman.sh +++ b/usr/lib/archboot/installer/pacman.sh @@ -66,9 +66,9 @@ dotesting() { if ! grep -q "^\[testing\]" /etc/pacman.conf; then 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" if [[ "${DOTESTING}" == "yes" ]]; then - #shellcheck disable=SC2129 - ! grep -q "^\[testing\]" /etc/pacman.conf && sed -i -e "s:#\[testing\]:\[testing\]\nInclude = /etc/pacman.d/mirrorlist:g" /etc/pacman.conf - ! grep -q "^\[community-testing\]" /etc/pacman.conf && sed -i -e "s:#\[community-testing\]:\[community-testing\]\nInclude = /etc/pacman.d/mirrorlist:g" /etc/pacman.conf + sed -i -e '/^#\[testing\]/ { n ; s/^#// }' /etc/pacman.conf + sed -i -e '/^#\[community-testing\]/ { n ; s/^#// }' /etc/pacman.conf + sed -i -e 's:^#\[testing\]:\[testing\]:g' -e 's:^#\[community-testing\]:\[community-testing\]:g' /etc/pacman.conf fi fi }