summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzachir <zachir@librem.one>2023-02-10 22:23:08 -0600
committerzachir <zachir@librem.one>2023-02-10 22:23:08 -0600
commit0a25ca51e26fa5ccafcc277b8f70819d74fe5555 (patch)
treeace8fa7c2dcf374557d34082bc4a661ab2ba705c
parentc878faf3a69a2664a06c98064edbd525affcb669 (diff)
remove universe repo after use (zirless)
-rwxr-xr-xzirless.sh9
1 files changed, 8 insertions, 1 deletions
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 <zachir@librem.one>
+# modified by Zach Smith <zachir@zachir.xyz>
# LARBS by Luke Smith <luke@lukesmith.xyz>
# 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