Fix for repo already in pacman.conf, also add empty line above for cleanliness
This commit is contained in:
parent
cf54edec73
commit
7d4cae4856
@ -6,7 +6,8 @@
|
|||||||
# Written by Nathaniel Maia <natemaia10@gmail.com>
|
# Written by Nathaniel Maia <natemaia10@gmail.com>
|
||||||
#
|
#
|
||||||
|
|
||||||
REPO='[archlabs_repo]
|
REPO='
|
||||||
|
[archlabs_repo]
|
||||||
Server = https://archlabs.github.io/archlabs_repo/$arch
|
Server = https://archlabs.github.io/archlabs_repo/$arch
|
||||||
Server = https://downloads.sourceforge.net/project/archlabs-repo/archlabs_repo/$arch'
|
Server = https://downloads.sourceforge.net/project/archlabs-repo/archlabs_repo/$arch'
|
||||||
|
|
||||||
@ -40,6 +41,9 @@ setupKeyring() {
|
|||||||
# add $REPO to pacman.conf
|
# add $REPO to pacman.conf
|
||||||
if ! grep "archlabs_repo" /etc/pacman.conf; then
|
if ! grep "archlabs_repo" /etc/pacman.conf; then
|
||||||
echo "${REPO}" | sudo tee -a /etc/pacman.conf
|
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
|
fi
|
||||||
|
|
||||||
# finish
|
# finish
|
||||||
|
Reference in New Issue
Block a user