linutil/core/tabs/system-setup/arch/yay-setup.sh
Adam Perkowski 216f1a4836
Restructure the crates (#549)
* BIG CHANGES

* core metadata

* Added readme.md to the package

* Moved the crate back to tui

Co-authored-by: Liam <lj3954@users.noreply.github.com>

---------

Co-authored-by: Liam <lj3954@users.noreply.github.com>
2024-09-19 19:09:53 -05:00

27 lines
839 B
Bash
Executable File

#!/bin/sh -e
. ../../common-script.sh
installDepend() {
case "$PACKAGER" in
pacman)
if ! command_exists yay; then
printf "%b\n" "${YELLOW}Installing yay as AUR helper...${RC}"
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm base-devel
cd /opt && "$ESCALATION_TOOL" git clone https://aur.archlinux.org/yay-bin.git && "$ESCALATION_TOOL" chown -R "$USER": ./yay-bin
cd yay-bin && makepkg --noconfirm -si
printf "%b\n" "${GREEN}Yay installed${RC}"
else
printf "%b\n" "${GREEN}Aur helper already installed${RC}"
fi
;;
*)
printf "%b\n" "${RED}Unsupported package manager: "$PACKAGER"${RC}"
;;
esac
}
checkEnv
checkEscalationTool
installDepend