summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzachir <zachir@librem.one>2021-08-25 16:55:34 -0500
committerzachir <zachir@librem.one>2021-08-25 16:55:34 -0500
commit06eb3f3b0ebe9b86fe580089c4688043e717220d (patch)
treefcfbd911e52eb271b1e91b015877d2751fe7e772
parentf34bc97a2c56901248aa694a7e4ed7ddea807ff5 (diff)
progs.csv: replace LARBS with ZIRLESS
-rw-r--r--larbs.sh38
1 files changed, 25 insertions, 13 deletions
diff --git a/larbs.sh b/larbs.sh
index 33a9444..110d9c8 100644
--- a/larbs.sh
+++ b/larbs.sh
@@ -1,6 +1,7 @@
#!/bin/sh
-# Luke's Auto Rice Boostrapping Script (LARBS)
-# by Luke Smith <luke@lukesmith.xyz>
+# ZachIR's LARBS Equivalent Setup Script (ZIRLESS)
+# modified by Zach Smith <zachir@librem.one>
+# LARBS by Luke Smith <luke@lukesmith.xyz>
# License: GNU GPLv3
### OPTIONS AND VARIABLES ###
@@ -47,7 +48,7 @@ getuserandpass() { \
usercheck() { \
! { id -u "$name" >/dev/null 2>&1; } ||
- dialog --colors --title "WARNING!" --yes-label "CONTINUE" --no-label "No wait..." --yesno "The user \`$name\` already exists on this system. LARBS can install for a user already existing, but it will \\Zboverwrite\\Zn any conflicting settings/dotfiles on the user account.\\n\\nLARBS will \\Zbnot\\Zn overwrite your user files, documents, videos, etc., so don't worry about that, but only click <CONTINUE> if you don't mind your settings being overwritten.\\n\\nNote also that LARBS will change $name's password to the one you just gave." 14 70
+ dialog --colors --title "WARNING!" --yes-label "CONTINUE" --no-label "No wait..." --yesno "The user \`$name\` already exists on this system. ZIRLESS can install for a user already existing, but it will \\Zboverwrite\\Zn any conflicting settings/dotfiles on the user account.\\n\\nZIRLESS will \\Zbnot\\Zn overwrite your user files, documents, videos, etc., so don't worry about that, but only click <CONTINUE> if you don't mind your settings being overwritten.\\n\\nNote also that ZIRLESS will change $name's password to the one you just gave." 14 70
}
preinstallmsg() { \
@@ -70,8 +71,8 @@ refreshkeys() { \
}
newperms() { # Set special sudoers settings for install (or after).
- sed -i "/#LARBS/d" /etc/sudoers
- echo "$* #LARBS" >> /etc/sudoers ;}
+ sed -i "/#ZIRLESS/d" /etc/sudoers
+ echo "$* #ZIRLESS" >> /etc/sudoers ;}
manualinstall() { # Installs $1 manually if not installed. Used only for AUR helper here.
[ -f "/usr/bin/$1" ] || (
@@ -85,28 +86,38 @@ manualinstall() { # Installs $1 manually if not installed. Used only for AUR hel
cd /tmp || return 1) ;}
maininstall() { # Installs all needed programs from main repo.
- dialog --title "LARBS Installation" --infobox "Installing \`$1\` ($n of $total). $1 $2" 5 70
+ dialog --title "ZIRLESS Installation" --infobox "Installing \`$1\` ($n of $total). $1 $2" 5 70
installpkg "$1"
}
gitmakeinstall() {
progname="$(basename "$1" .git)"
dir="$repodir/$progname"
- dialog --title "LARBS Installation" --infobox "Installing \`$progname\` ($n of $total) via \`git\` and \`make\`. $(basename "$1") $2" 5 70
+ dialog --title "ZIRLESS Installation" --infobox "Installing \`$progname\` ($n of $total) via \`git\` and \`make\`. $(basename "$1") $2" 5 70
sudo -u "$name" git clone --depth 1 "$1" "$dir" >/dev/null 2>&1 || { cd "$dir" || return 1 ; sudo -u "$name" git pull --force origin master;}
cd "$dir" || exit 1
make >/dev/null 2>&1
make install >/dev/null 2>&1
cd /tmp || return 1 ;}
+gitmakepkginstall() {
+ pkgname="$(basename "$1" .git)"
+ dir="$repodir/$progname"
+ dialog --title "ZIRLESS Installation" --infobox "Installing \`$progname\` ($n of $total) via \`git\` and \`makepkg\`. $(basename "$1") $2" 5 70
+ sudo -u "$name" git clone --depth 1 "$1" "$dir" >/dev/null 2>&1 || { cd "$dir" || return 1 ; sudo -u "$name" git pull --forve origin master;}
+ cd "$dir" || exit 1
+ makepkg -si
+ pacman -U *.pkg.tar.zst
+ cd /tmp || return 1 ;}
+
aurinstall() { \
- dialog --title "LARBS Installation" --infobox "Installing \`$1\` ($n of $total) from the AUR. $1 $2" 5 70
+ dialog --title "ZIRLESS Installation" --infobox "Installing \`$1\` ($n of $total) from the AUR. $1 $2" 5 70
echo "$aurinstalled" | grep -q "^$1$" && return 1
sudo -u "$name" $aurhelper -S --noconfirm "$1" >/dev/null 2>&1
}
pipinstall() { \
- dialog --title "LARBS Installation" --infobox "Installing the Python package \`$1\` ($n of $total). $1 $2" 5 70
+ dialog --title "ZIRLESS Installation" --infobox "Installing the Python package \`$1\` ($n of $total). $1 $2" 5 70
[ -x "$(command -v "pip")" ] || installpkg python-pip >/dev/null 2>&1
yes | pip install "$1"
}
@@ -121,6 +132,7 @@ installationloop() { \
case "$tag" in
"A") aurinstall "$program" "$comment" ;;
"G") gitmakeinstall "$program" "$comment" ;;
+ "M") gitmakepkginstall "$program" "$comment" ;;
"P") pipinstall "$program" "$comment" ;;
*) maininstall "$program" "$comment" ;;
esac
@@ -170,11 +182,11 @@ preinstallmsg || error "User exited."
refreshkeys || error "Error automatically refreshing Arch keyring. Consider doing so manually."
for x in curl base-devel git ntp zsh; do
- dialog --title "LARBS Installation" --infobox "Installing \`$x\` which is required to install and configure other programs." 5 70
+ dialog --title "ZIRLESS Installation" --infobox "Installing \`$x\` which is required to install and configure other programs." 5 70
installpkg "$x"
done
-dialog --title "LARBS Installation" --infobox "Synchronizing system time to ensure successful and secure installation of software..." 4 70
+dialog --title "ZIRLESS Installation" --infobox "Synchronizing system time to ensure successful and secure installation of software..." 4 70
ntpdate 0.us.pool.ntp.org >/dev/null 2>&1
adduserandpass || error "Error adding username and/or password."
@@ -200,7 +212,7 @@ manualinstall yay-bin || error "Failed to install AUR helper."
# and all build dependencies are installed.
installationloop
-dialog --title "LARBS Installation" --infobox "Finally, installing \`libxft-bgra\` to enable color emoji in suckless software without crashes." 5 70
+dialog --title "ZIRLESS Installation" --infobox "Finally, installing \`libxft-bgra\` to enable color emoji in suckless software without crashes." 5 70
yes | sudo -u "$name" $aurhelper -S libxft-bgra-git >/dev/null 2>&1
# Install the dotfiles in the user's home directory
@@ -246,7 +258,7 @@ pkill -15 -x 'pulseaudio'; sudo -u "$name" pulseaudio --start
# This line, overwriting the `newperms` command above will allow the user to run
# serveral important commands, `shutdown`, `reboot`, updating, etc. without a password.
-newperms "%wheel ALL=(ALL) ALL #LARBS
+newperms "%wheel ALL=(ALL) ALL #ZIRLESS
%wheel ALL=(ALL) NOPASSWD: /usr/bin/shutdown,/usr/bin/reboot,/usr/bin/systemctl suspend,/usr/bin/wifi-menu,/usr/bin/mount,/usr/bin/umount,/usr/bin/pacman -Syu,/usr/bin/pacman -Syyu,/usr/bin/packer -Syu,/usr/bin/packer -Syyu,/usr/bin/systemctl restart NetworkManager,/usr/bin/rc-service NetworkManager restart,/usr/bin/pacman -Syyu --noconfirm,/usr/bin/loadkeys,/usr/bin/paru,/usr/bin/pacman -Syyuw --noconfirm"
# Last message! Install complete!