From 12943bae911e7c0e8b61e78ca68281fee35cef09 Mon Sep 17 00:00:00 2001 From: Aminda Suomalainen Date: Sat, 27 Jan 2024 10:38:43 +0200 Subject: [PATCH] bash/usr-local-bin: add libreoffice for tricking me into the flatpak --- bash/usr-local-bin/libreoffice | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 bash/usr-local-bin/libreoffice diff --git a/bash/usr-local-bin/libreoffice b/bash/usr-local-bin/libreoffice new file mode 100755 index 0000000..a049669 --- /dev/null +++ b/bash/usr-local-bin/libreoffice @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +# workarounding dependency issues + +#set -x +# The usual system-wide installation +if [ -f /var/lib/flatpak/exports/bin/org.libreoffice.LibreOffice ]; then + flatpak run org.libreoffice.LibreOffice $@ +# User-specific flatpak +elif [ -f ~/.local/share/flatpak/exports/bin/org.libreoffice.LibreOffice ]; then + flatpak run --user org.libreoffice.LibreOffice $@ +# The usual installation +elif [ -f /usr/bin/libreoffice ]; then + /usr/bin/libreoffice $@ +else + printf "LibreOffice doesn't seem to be installed :(" +fi +#set +x