summaryrefslogtreecommitdiff
path: root/zirless.sh
diff options
context:
space:
mode:
Diffstat (limited to 'zirless.sh')
-rw-r--r--zirless.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/zirless.sh b/zirless.sh
index 07586b2..119ce0d 100644
--- a/zirless.sh
+++ b/zirless.sh
@@ -75,8 +75,9 @@ newperms() { # Set special sudoers settings for install (or after).
echo "$* #ZIRLESS" >> /etc/sudoers ;}
artixaddarchrepos() { # Adds the Arch repos to Artix Linux (some ZIRLESS packages require it)
- pacman -S --noconfirm artix-archlinux-support archlinux-mirrorlist archlinux-keyring >/dev/null 2>&1 || exit 3
- grep -q '[extra]\|[community]' /etc/pacman.conf || echo "
+ grep -q 'Artix' /etc/lsb-release && \
+ pacman -S --noconfirm artix-archlinux-support archlinux-mirrorlist archlinux-keyring >/dev/null 2>&1 || exit 3
+ grep -q '\[extra\]\|\[community\]' /etc/pacman.conf || echo "
[extra]
Include = /etc/pacman.d/mirrorlist-arch
@@ -84,8 +85,8 @@ Include = /etc/pacman.d/mirrorlist-arch
Include = /etc/pacman.d/mirrorlist-arch
[multilib]
-Include = /etc/pacman.d/mirrorlist-arch
-" >> /etc/pacman.conf >/dev/null 2>&1 ;}
+Include = /etc/pacman.d/mirrorlist-arch" \
+ >> /etc/pacman.conf 2>/dev/null ;}
manualinstall() { # Installs $1 manually if not installed. Used only for AUR helper here.
[ -f "/usr/bin/$1" ] || (
@@ -213,14 +214,13 @@ newperms "%wheel ALL=(ALL) NOPASSWD: ALL"
# Make pacman and paru colorful and adds eye candy on the progress bar because why not.
grep -q "^Color" /etc/pacman.conf || sed -i "s/^#Color$/Color/" /etc/pacman.conf
grep -q "ILoveCandy" /etc/pacman.conf || sed -i "/#VerbosePkgLists/a #ILoveCandy" /etc/pacman.conf
-grep -q "ParallelDownloads" /etc/pacman.conf || sed -i "/ILoveCandy/a ParallelDownloads = 6" /etc/pacman.conf
# Use all cores for compilation.
sed -i "s/-j2/-j$(nproc)/;s/^#MAKEFLAGS/MAKEFLAGS/" /etc/makepkg.conf
manualinstall yay-bin || error "Failed to install AUR helper."
-artixaddarchrepos
+artixaddarchrepos || error "Failed to add Arch Linux repos."
# 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