From 7d4cae485632c3be0cce1d1955b07ed823b833e6 Mon Sep 17 00:00:00 2001 From: natemaia Date: Sat, 28 Oct 2017 22:26:13 -0700 Subject: [PATCH] Fix for repo already in pacman.conf, also add empty line above for cleanliness --- upgrade-archlabs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/upgrade-archlabs b/upgrade-archlabs index 59015de9..1336a919 100755 --- a/upgrade-archlabs +++ b/upgrade-archlabs @@ -6,7 +6,8 @@ # Written by Nathaniel Maia # -REPO='[archlabs_repo] +REPO=' +[archlabs_repo] Server = https://archlabs.github.io/archlabs_repo/$arch Server = https://downloads.sourceforge.net/project/archlabs-repo/archlabs_repo/$arch' @@ -40,6 +41,9 @@ setupKeyring() { # add $REPO to pacman.conf if ! grep "archlabs_repo" /etc/pacman.conf; then echo "${REPO}" | sudo tee -a /etc/pacman.conf + else ## if entries exist just remove them + sudo sed -i '/archlabs_repo/d' + echo "${REPO}" | sudo tee -a /etc/pacman.conf fi # finish