linutil/src/commands/system-setup/arch/yay-setup.sh

25 lines
694 B
Bash
Raw Normal View History

2024-08-15 22:23:21 +01:00
#!/bin/sh -e
. "$(dirname "$0")/../../common-script.sh"
installDepend() {
case $PACKAGER in
pacman)
if ! command_exists yay; then
echo "Installing yay as AUR helper..."
sudo "$PACKAGER" --noconfirm -S base-devel
cd /opt && sudo git clone https://aur.archlinux.org/yay-git.git && sudo chown -R "$USER": ./yay-git
cd yay-git && makepkg --noconfirm -si
echo "Yay installed"
else
echo "Aur helper already installed"
fi
;;
*)
echo "Unsupported package manager: $PACKAGER"
;;
esac
}
checkEnv
installDepend