yay fix? can't test now

This commit is contained in:
Luke Smith 2021-09-06 17:19:52 -04:00
parent b4167af0e7
commit 99c35a39a3
No known key found for this signature in database
GPG Key ID: 4C50B54A911F6252

View File

@ -59,7 +59,7 @@ adduserandpass() { \
dialog --infobox "Adding user \"$name\"..." 4 50 dialog --infobox "Adding user \"$name\"..." 4 50
useradd -m -g wheel -s /bin/zsh "$name" >/dev/null 2>&1 || useradd -m -g wheel -s /bin/zsh "$name" >/dev/null 2>&1 ||
usermod -a -G wheel "$name" && mkdir -p /home/"$name" && chown "$name":wheel /home/"$name" usermod -a -G wheel "$name" && mkdir -p /home/"$name" && chown "$name":wheel /home/"$name"
repodir="/home/$name/.local/src"; mkdir -p "$repodir"; chown -R "$name":wheel "$(dirname "$repodir")" export repodir="/home/$name/.local/src"; mkdir -p "$repodir"; chown -R "$name":wheel "$(dirname "$repodir")"
echo "$name:$pass1" | chpasswd echo "$name:$pass1" | chpasswd
unset pass1 pass2 ;} unset pass1 pass2 ;}
@ -73,16 +73,15 @@ newperms() { # Set special sudoers settings for install (or after).
sed -i "/#LARBS/d" /etc/sudoers sed -i "/#LARBS/d" /etc/sudoers
echo "$* #LARBS" >> /etc/sudoers ;} echo "$* #LARBS" >> /etc/sudoers ;}
manualinstall() { # Installs $1 manually if not installed. Used only for AUR helper here. manualinstall() { # Installs $1 manually. Used only for AUR helper here.
[ -f "/usr/bin/$1" ] || ( # Should be run after repodir is created and var is set.
dialog --infobox "Installing \"$1\", an AUR helper..." 4 50 dialog --infobox "Installing \"$1\", an AUR helper..." 4 50
cd /tmp || exit 1 sudo -u "$name" mkdir -p "$repodir/$1"
rm -rf /tmp/"$1"* sudo -u "$name" git clone --depth 1 "https://aur.archlinux.org/$1.git" "$repodir/$1" >/dev/null 2>&1 ||
curl -sO https://aur.archlinux.org/cgit/aur.git/snapshot/"$1".tar.gz && { cd "$repodir/$1" || return 1 ; sudo -u "$name" git pull --force origin master;}
sudo -u "$name" tar -xvf "$1".tar.gz >/dev/null 2>&1 && cd "$repodir/$1"
cd "$1" && sudo -u "$name" -D "$repodir/$1" makepkg --noconfirm -si >/dev/null 2>&1 || return 1
sudo -u "$name" makepkg --noconfirm -si >/dev/null 2>&1 || return 1 }
cd /tmp || return 1) ;}
maininstall() { # Installs all needed programs from main repo. maininstall() { # Installs all needed programs from main repo.
dialog --title "LARBS Installation" --infobox "Installing \`$1\` ($n of $total). $1 $2" 5 70 dialog --title "LARBS Installation" --infobox "Installing \`$1\` ($n of $total). $1 $2" 5 70