mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-23 13:45:19 +00:00
d4eacaeab3
* Fix flatpak paths * Refact office suites flatpak * Merge flatpak_app_exists and command_exists * Fix binary path bug * Add apk pgm --------- Co-authored-by: Chris Titus <contact@christitus.com>
33 lines
1.1 KiB
Bash
33 lines
1.1 KiB
Bash
#!/bin/sh -e
|
|
|
|
. ../../common-script.sh
|
|
|
|
installOnlyOffice() {
|
|
if ! command_exists org.onlyoffice.desktopeditors && ! command_exists onlyoffice-desktopeditors; then
|
|
printf "%b\n" "${YELLOW}Installing Only Office..${RC}."
|
|
case "$PACKAGER" in
|
|
apt-get|nala)
|
|
curl -O https://download.onlyoffice.com/install/desktop/editors/linux/onlyoffice-desktopeditors_amd64.deb
|
|
"$ESCALATION_TOOL" "$PACKAGER" install -y ./onlyoffice-desktopeditors_amd64.deb
|
|
;;
|
|
zypper|dnf)
|
|
checkFlatpak
|
|
flatpak install -y flathub org.onlyoffice.desktopeditors
|
|
;;
|
|
pacman)
|
|
"$AUR_HELPER" -S --needed --noconfirm onlyoffice
|
|
;;
|
|
*)
|
|
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
|
|
exit 1
|
|
;;
|
|
esac
|
|
else
|
|
printf "%b\n" "${GREEN}Only Office is already installed.${RC}"
|
|
fi
|
|
}
|
|
|
|
checkEnv
|
|
checkEscalationTool
|
|
checkAurHelper
|
|
installOnlyOffice |