2024-01-27 09:38:43 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# workarounding dependency issues
|
|
|
|
|
2024-04-19 09:00:33 +02:00
|
|
|
set -x
|
2024-01-27 09:38:43 +01:00
|
|
|
# The usual system-wide installation
|
|
|
|
if [ -f /var/lib/flatpak/exports/bin/org.libreoffice.LibreOffice ]; then
|
2024-03-20 05:50:18 +01:00
|
|
|
flatpak run org.libreoffice.LibreOffice "$@"
|
2024-01-27 09:38:43 +01:00
|
|
|
# User-specific flatpak
|
|
|
|
elif [ -f ~/.local/share/flatpak/exports/bin/org.libreoffice.LibreOffice ]; then
|
2024-03-20 05:50:18 +01:00
|
|
|
flatpak run --user org.libreoffice.LibreOffice "$@"
|
2024-01-27 09:38:43 +01:00
|
|
|
# The usual installation
|
|
|
|
elif [ -f /usr/bin/libreoffice ]; then
|
2024-03-20 05:50:18 +01:00
|
|
|
/usr/bin/libreoffice "$@"
|
2024-01-27 09:38:43 +01:00
|
|
|
else
|
|
|
|
printf "LibreOffice doesn't seem to be installed :("
|
|
|
|
fi
|
2024-04-19 09:00:33 +02:00
|
|
|
set +x
|