From ebf5d89cc33afad9c093d49e44491d07505d836f Mon Sep 17 00:00:00 2001 From: Botspot Date: Sat, 10 Jul 2021 00:38:03 -0500 Subject: [PATCH] Libreoffice MS Theme: check if libreoffice installed --- apps/Libreoffice MS theme/install | 4 ++++ apps/Libreoffice MS theme/uninstall | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/Libreoffice MS theme/install b/apps/Libreoffice MS theme/install index 253a708..9d576f4 100755 --- a/apps/Libreoffice MS theme/install +++ b/apps/Libreoffice MS theme/install @@ -7,6 +7,10 @@ function error { exit 1 } +if ! command -v libreoffice >/dev/null ;then + error "Libreoffice is not installed, so this theme is useless to you.\nTo install libreoffice, run this in a terminal:\nsudo apt install libreoffice libreoffice-gtk2" +fi + rm -rf ~/libreoffice-ms-theme git clone --depth=1 https://github.com/Botspot/libreoffice-ms-theme || error "Failed to git clone libreoffice-ms-theme repository!" ~/libreoffice-ms-theme/apply.sh || error "apply.sh failed" diff --git a/apps/Libreoffice MS theme/uninstall b/apps/Libreoffice MS theme/uninstall index 04372e5..1aa1e0d 100755 --- a/apps/Libreoffice MS theme/uninstall +++ b/apps/Libreoffice MS theme/uninstall @@ -9,7 +9,7 @@ function error { rm -rf ~/libreoffice-ms-theme git clone --depth=1 https://github.com/Botspot/libreoffice-ms-theme || error "Failed to git clone libreoffice-ms-theme repository!" -~/libreoffice-ms-theme/revert.sh || error "apply.sh failed" +~/libreoffice-ms-theme/revert.sh || error "revert.sh failed" rm -rf ~/libreoffice-ms-theme echo "Your original settings are now restored. Libreoffice should now behave how it was originally."