bash/usr-local-bin: add libreoffice for tricking me into the flatpak

This commit is contained in:
Aminda Suomalainen 2024-01-27 10:38:43 +02:00
parent b9626ae09c
commit 12943bae91
Signed by: Mikaela
SSH Key Fingerprint: SHA256:CXLULpqNBdUKB6E6fLA1b/4SzG0HvKD19PbIePU175Q

18
bash/usr-local-bin/libreoffice Executable file
View File

@ -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