2024-08-15 16:23:21 -05:00
|
|
|
#!/bin/sh -e
|
|
|
|
|
2024-09-12 16:14:50 -04:00
|
|
|
. ../../common-script.sh
|
2024-08-15 16:23:21 -05:00
|
|
|
|
|
|
|
installDepend() {
|
2024-09-17 17:53:23 +05:30
|
|
|
case "$PACKAGER" in
|
2024-08-15 16:23:21 -05:00
|
|
|
pacman)
|
|
|
|
if ! command_exists yay; then
|
2024-09-18 20:40:05 -04:00
|
|
|
printf "%b\n" "${YELLOW}Installing yay as AUR helper...${RC}"
|
2024-09-28 15:13:35 -04:00
|
|
|
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm base-devel git
|
2024-09-19 13:05:36 -05:00
|
|
|
cd /opt && "$ESCALATION_TOOL" git clone https://aur.archlinux.org/yay-bin.git && "$ESCALATION_TOOL" chown -R "$USER": ./yay-bin
|
2024-09-18 14:40:31 -04:00
|
|
|
cd yay-bin && makepkg --noconfirm -si
|
2024-09-18 20:40:05 -04:00
|
|
|
printf "%b\n" "${GREEN}Yay installed${RC}"
|
2024-08-15 16:23:21 -05:00
|
|
|
else
|
2024-09-18 20:40:05 -04:00
|
|
|
printf "%b\n" "${GREEN}Aur helper already installed${RC}"
|
2024-08-15 16:23:21 -05:00
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*)
|
2024-09-22 12:01:10 -04:00
|
|
|
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
|
2024-08-15 16:23:21 -05:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
|
|
|
checkEnv
|
2024-08-23 09:12:47 -04:00
|
|
|
checkEscalationTool
|
|
|
|
installDepend
|