mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-27 15:26:03 +00:00
38 lines
1.3 KiB
Bash
38 lines
1.3 KiB
Bash
|
#!/bin/sh -e
|
||
|
|
||
|
. ../common-script.sh
|
||
|
|
||
|
installFreeOffice() {
|
||
|
if ! command_exists softmaker-freeoffice-2024 freeoffice softmaker; then
|
||
|
printf "%b\n" "${YELLOW}Installing Free Office...${RC}"
|
||
|
case "$PACKAGER" in
|
||
|
apt-get|nala)
|
||
|
curl -O https://www.softmaker.net/down/softmaker-freeoffice-2024_1218-01_amd64.deb
|
||
|
"$ESCALATION_TOOL" "$PACKAGER" install -y ./softmaker-freeoffice-2024_1218-01_amd64.deb
|
||
|
;;
|
||
|
zypper)
|
||
|
"$ESCALATION_TOOL" "$PACKAGER" addrepo -f https://shop.softmaker.com/repo/rpm SoftMaker
|
||
|
"$ESCALATION_TOOL" "$PACKAGER" --gpg-auto-import-keys refresh
|
||
|
"$ESCALATION_TOOL" "$PACKAGER" --non-interactive install softmaker-freeoffice-2024
|
||
|
;;
|
||
|
pacman)
|
||
|
"$AUR_HELPER" -S --needed --noconfirm freeoffice
|
||
|
;;
|
||
|
dnf)
|
||
|
"$ESCALATION_TOOL" curl -O -qO /etc/yum.repos.d/softmaker.repo https://shop.softmaker.com/repo/softmaker.repo
|
||
|
"$ESCALATION_TOOL" "$PACKAGER" install -y softmaker-freeoffice-2024
|
||
|
;;
|
||
|
*)
|
||
|
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
|
||
|
exit 1
|
||
|
;;
|
||
|
esac
|
||
|
else
|
||
|
printf "%b\n" "${GREEN}Free Office is already installed.${RC}"
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
checkEnv
|
||
|
checkEscalationTool
|
||
|
checkAurHelper
|
||
|
installFreeOffice
|