From 2dd70d8fc8be7ea5c3ffc6deea05c50fea2ab692 Mon Sep 17 00:00:00 2001 From: "David T. Sadler" Date: Thu, 18 Jun 2020 22:02:13 +0100 Subject: Install yay --- gohan.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/gohan.sh b/gohan.sh index 89c84e7..42cb4df 100644 --- a/gohan.sh +++ b/gohan.sh @@ -111,6 +111,20 @@ configure_sudo() { [ -f /etc/sudoers ] && sed -i "s/# %wheel ALL=(ALL) NOPASSWORD: ALL/%wheel ALL=(ALL) NOPASSWORD: ALL/" /etc/sudoers } +install_yay() { + [ -f "/usr/bin/yay" ] || ( + dialog --infobox "Installing \"yay\", an AUR helper..." 4 50 + cd /tmp || exit + rm -rf /tmp/yay* + # Use all cores for compilation. + sed -i "s/-j2/-j$(nproc)/;s/^#MAKEFLAGS/MAKEFLAGS/" /etc/makepkg.conf + curl -sO https://aur.archlinux.org/cgit/aur.git/snapshot/yay.tar.gz && + sudo -u "$name" tar -xvf yar.tar.gz >/dev/null 2>&1 && + cd yay && + sudo -u "$name" makepkg --noconfirm -si >/dev/null 2>&1 + cd /tmp || return); +} + ### THE ACTUAL SCRIPT ### install_from_pacman dialog || error "Are you sure you're running this as the root user and have an internet connection?" @@ -129,6 +143,8 @@ configure_sudo install_dotfiles $dotfilesrepo "/home/$name/.local/src/dotfiles" +install_yay + install_software clear -- cgit v1.2.3-13-gbd6f