linutil/core/tabs/applications-setup/office-suites/wpsoffice.sh

36 lines
772 B
Bash
Raw Normal View History

#!/bin/sh -e
. ../common-script.sh
2024-10-01 07:13:28 +01:00
checkWpsOfficeInstallation() {
case "$PACKAGER" in
pacman)
command_exists wps
;;
*)
checkFlatpak
flatpak_app_exists com.wps.Office
;;
esac
}
installWpsOffice() {
2024-10-01 07:13:28 +01:00
if ! checkWpsOfficeInstallation; then
printf "%b\n" "${YELLOW}Installing WPS Office...${RC}"
case "$PACKAGER" in
pacman)
"$AUR_HELPER" -S --needed --noconfirm wps-office
;;
*)
flatpak install flathub com.wps.Office
;;
esac
else
printf "%b\n" "${GREEN}WPS Office is already installed.${RC}"
fi
}
checkEnv
checkEscalationTool
checkAurHelper
installWpsOffice