-
Notifications
You must be signed in to change notification settings - Fork 29
/
libreoffice.sh
executable file
·30 lines (27 loc) · 1.1 KB
/
libreoffice.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
echo "LibreOffice script started!"
case "$__os_id" in
Ubuntu)
ubuntu_ppa_installer "libreoffice/ppa" || error "PPA failed to install"
sudo apt install -y --no-install-recommends libreoffice libxrender1 libreoffice-gtk3 || error "Failed to install dependencies"
if echo $XDG_CURRENT_DESKTOP | grep -q 'GNOME'; then
sudo apt install -y --no-install-recommends libreoffice-gnome || error "Failed to install dependencies"
elif echo $XDG_CURRENT_DESKTOP | grep -q 'KDE'; then
sudo apt install -y --no-install-recommends libreoffice-kf5 || error "Failed to install dependencies"
fi
;;
Fedora)
sudo dnf install -y libreoffice || error "Failed to install dependencies"
;;
Raspbian | Debian)
package_available libreoffice-gtk2
if [[ $? == "0" ]]; then
sudo apt install -y --no-install-recommends libreoffice libxrender1 libreoffice-gtk3 || error "Failed to install dependencies"
else
sudo apt install -y --no-install-recommends libreoffice libxrender1 libreoffice-gtk2 libreoffice-gtk3 || error "Failed to install dependencies"
fi
;;
*)
error "Unknown distro detected"
;;
esac
echo "Done!"