Prevent duplicated repo additions.

When the script gets run multiple times, it keeps adding the repo to `/etc/pacman.conf`.
This fixes that bug.
This commit is contained in:
©TriMoon™ 2021-01-13 17:29:43 +03:00 committed by GitHub
parent 809dc217a0
commit 97db23db98
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

5
init
View file

@ -28,7 +28,10 @@ get_iso_build_date () {
}
init_archzfs () {
if pacman -Sl archzfs >/dev/null 2>&1; then
print "archzfs repo was already added"
return
fi
print "Adding archzfs repo"
pacman -Sy archlinux-keyring --noconfirm &>/dev/null