linutil/core/tabs/system-setup/arch/paru-setup.sh
nyx 9353849e16
use bin for faster installation (#748)
Co-authored-by: nyx <nnyyxxxx@users.noreply.github.com>
2024-10-31 13:40:07 -05:00

27 lines
845 B
Bash
Executable File

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