scripts/bash/usr-local-bin/fluffychat

18 lines
509 B
Bash
Executable File

#!/usr/bin/env bash
# Flutter doesn't support flatpak, so Snap is the least bad Fluffy experience.
# I presume repo version is always outdated, so fallback to flathub s less
# bad.
set -x
if [ -f /snap/bin/fluffychat ]; then
# https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1951491/comments/104
unset DBUS_SESSION_BUS_ADDRESS
snap run fluffychat $@
elif [ -f /var/lib/flatpak/exports/bin/im.fluffychat.Fluffychat ]; then
flatpak run im.fluffychat.Fluffychat $@
else
/usr/bin/fluffychat
fi
set +x