From 97db23db98636bd62ef94d21e6aae8970e71756a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C2=A9TriMoon=E2=84=A2?= Date: Wed, 13 Jan 2021 17:29:43 +0300 Subject: [PATCH] Prevent duplicated repo additions. When the script gets run multiple times, it keeps adding the repo to `/etc/pacman.conf`. This fixes that bug. --- init | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/init b/init index 80cac82..725c2a0 100755 --- a/init +++ b/init @@ -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