Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate the office suites and pdf suites #650

Merged
merged 8 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
203 changes: 0 additions & 203 deletions core/tabs/applications-setup/office-suite-setup.sh

This file was deleted.

38 changes: 38 additions & 0 deletions core/tabs/applications-setup/office-suites/freeoffice.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/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
31 changes: 31 additions & 0 deletions core/tabs/applications-setup/office-suites/libreoffice.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/sh -e

. ../common-script.sh

installLibreOffice() {
if ! command_exists libreoffice; then
printf "%b\n" "${YELLOW}Installing Libre Office...${RC}"
case "$PACKAGER" in
apt-get|nala)
"$ESCALATION_TOOL" "$PACKAGER" install -y libreoffice-core
;;
zypper|dnf)
. ./setup-flatpak.sh
flatpak install -y flathub org.libreoffice.LibreOffice
;;
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm libreoffice-fresh
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
;;
esac
else
printf "%b\n" "${GREEN}Libre Office is already installed.${RC}"
fi
}

checkEnv
checkEscalationTool
installLibreOffice
33 changes: 33 additions & 0 deletions core/tabs/applications-setup/office-suites/onlyoffice.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/sh -e

. ../common-script.sh

installOnlyOffice() {
if ! 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)
. ./setup-flatpak.sh
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
25 changes: 25 additions & 0 deletions core/tabs/applications-setup/office-suites/wpsoffice.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/sh -e

. ../common-script.sh

installWpsOffice() {
if ! command_exists com.wps.Office; then
printf "%b\n" "${YELLOW}Installing WPS Office...${RC}"
case "$PACKAGER" in
pacman)
"$AUR_HELPER" -S --needed --noconfirm wps-office
;;
*)
. ./setup-flatpak.sh
flatpak install flathub com.wps.Office
;;
esac
else
printf "%b\n" "${GREEN}WPS Office is already installed.${RC}"
fi
}

checkEnv
checkEscalationTool
checkAurHelper
installWpsOffice
23 changes: 23 additions & 0 deletions core/tabs/applications-setup/pdf-suites/evince.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/sh -e

. ../common-script.sh

installEvince() {
if ! command_exists evince; then
printf "%b\n" "${YELLOW}Installing Evince...${RC}"
case "$PACKAGER" in
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm evince
;;
*)
"$ESCALATION_TOOL" "$PACKAGER" install -y evince
;;
esac
else
printf "%b\n" "${GREEN}Evince is already installed.${RC}"
fi
}

checkEnv
checkEscalationTool
installEvince
23 changes: 23 additions & 0 deletions core/tabs/applications-setup/pdf-suites/okular.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/sh -e

. ../common-script.sh

installOkular() {
if ! command_exists okular; then
printf "%b\n" "${YELLOW}Installing Okular...${RC}"
case "$PACKAGER" in
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm okular
;;
*)
"$ESCALATION_TOOL" "$PACKAGER" install -y okular
;;
esac
else
printf "%b\n" "${GREEN}Okular is already installed.${RC}"
fi
}

checkEnv
checkEscalationTool
installOkular
Loading
Loading