2024-08-15 22:23:21 +01:00
|
|
|
#!/bin/sh -e
|
|
|
|
|
2024-09-12 21:14:50 +01:00
|
|
|
. ../../common-script.sh
|
2024-08-15 22:23:21 +01:00
|
|
|
|
|
|
|
installDepend() {
|
2024-09-17 13:23:23 +01:00
|
|
|
case "$PACKAGER" in
|
2024-08-15 22:23:21 +01:00
|
|
|
pacman)
|
|
|
|
if ! command_exists paru; then
|
2024-09-19 01:40:05 +01:00
|
|
|
printf "%b\n" "${YELLOW}Installing paru as AUR helper...${RC}"
|
2024-09-28 20:13:35 +01:00
|
|
|
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm base-devel git
|
2024-10-03 12:57:17 +01:00
|
|
|
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
|
2024-09-19 01:40:05 +01:00
|
|
|
printf "%b\n" "${GREEN}Paru installed${RC}"
|
2024-08-15 22:23:21 +01:00
|
|
|
else
|
2024-09-19 01:40:05 +01:00
|
|
|
printf "%b\n" "${GREEN}Paru already installed${RC}"
|
2024-08-15 22:23:21 +01:00
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*)
|
2024-09-22 17:01:10 +01:00
|
|
|
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
|
2024-08-15 22:23:21 +01:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
|
|
|
checkEnv
|
2024-08-23 14:12:47 +01:00
|
|
|
checkEscalationTool
|
|
|
|
installDepend
|