2024-09-30 03:14:40 +01:00
|
|
|
#!/bin/sh -e
|
|
|
|
|
|
|
|
. ../../common-script.sh
|
|
|
|
|
|
|
|
installWaterfox() {
|
2024-09-30 04:59:05 +01:00
|
|
|
buildWaterfox=$(curl -L -o waterfox.tar.bz2 "https://cdn1.waterfox.net/waterfox/releases/latest/linux" && tar -xvjf waterfox.tar.bz2 -C ./ && rm waterfox.tar.bz2 ; sudo mkdir -p /opt/waterfox && sudo mv waterfox /opt/waterfox && cd /opt/waterfox/waterfox && sudo ln -s /opt/waterfox/waterfox/waterfox /usr/bin/waterfox)
|
|
|
|
|
2024-09-30 05:04:33 +01:00
|
|
|
if ! command_exists waterfox; then
|
2024-09-30 04:59:05 +01:00
|
|
|
printf "%b\n" "${YELLOW}Installing waterfox...${RC}"
|
|
|
|
case "$PACKAGER" in
|
|
|
|
apt-get|nala)
|
|
|
|
"$ESCALATION_TOOL" "$PACKAGER" install -y curl && printf("$buildWaterfox")
|
|
|
|
;;
|
|
|
|
zypper)
|
|
|
|
"$ESCALATION_TOOL" "$PACKAGER" --non-interactive install curl && printf("$buildWaterfox")
|
|
|
|
;;
|
|
|
|
pacman)
|
|
|
|
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm curl && printf("$buildWaterfox")
|
|
|
|
;;
|
|
|
|
dnf)
|
|
|
|
"$ESCALATION_TOOL" "$PACKAGER" install -y curl && printf("$buildWaterfox")
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
2024-09-30 03:14:40 +01:00
|
|
|
else
|
2024-09-30 04:59:05 +01:00
|
|
|
printf "%b\n" "${GREEN}Waterfox Browser is already installed.${RC}"
|
2024-09-30 03:14:40 +01:00
|
|
|
fi
|
|
|
|
}
|
2024-09-30 04:05:07 +01:00
|
|
|
|
2024-09-30 04:08:12 +01:00
|
|
|
checkEnv
|
|
|
|
checkEscalationTool
|
2024-09-30 04:05:07 +01:00
|
|
|
installWaterfox
|