From 0a25ca51e26fa5ccafcc277b8f70819d74fe5555 Mon Sep 17 00:00:00 2001 From: zachir Date: Fri, 10 Feb 2023 22:23:08 -0600 Subject: remove universe repo after use (zirless) --- zirless.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/zirless.sh b/zirless.sh index 94292b8..fdcb273 100755 --- a/zirless.sh +++ b/zirless.sh @@ -1,6 +1,6 @@ #!/bin/sh # ZachIR's LARBS Equivalent Setup Script (ZIRLESS) -# modified by Zach Smith +# modified by Zach Smith # LARBS by Luke Smith # License: GNU GPLv3 @@ -134,6 +134,11 @@ Include = /etc/pacman.d/mirrorlist-universe ' >> /etc/pacman.conf pacman -Syy ;} +artixremoveuniverserepo() { # Disables the universe repo (after adding Arch repos) + dialog --infobox "Adding universe repo to Artix..." 4 50 + sed -iE "s_(^\[universe\])_#\\1_g;s_(^Include = [A-Za-z./]*-universe)_#\\1_g" /etc/pacman.conf + pacman -Syy ;} + artixaddarchrepos() { # Adds the Arch repos to Artix Linux (some ZIRLESS packages require it) dialog --infobox "Adding arch repos to Artix..." 4 50 pacman -S --noconfirm artix-archlinux-support archlinux-mirrorlist archlinux-keyring >/dev/null 2>&1 || exit 3 @@ -287,6 +292,8 @@ grep -q '^\[extra\]' /etc/pacman.conf || artixaddarchrepos || error "Failed to a refreshkeys || error "Error automatically refreshing Arch keyring. Consider doing so manually." +grep -q '^\[universe\]' /etc/pacman.conf && artixremoveuniverserepo || error "Failed to remove universe repo; some packages may not install properly." + # The command that does all the installing. Reads the progs.csv file and # installs each needed program the way required. Be sure to run this only after # the user has been created and has priviledges to run $rootcmd without a password -- cgit v1.2.3