mirror of
https://gitea.blesmrt.net/mikaela/scripts.git
synced 2024-12-22 18:52:46 +01:00
20 lines
757 B
Bash
Executable File
20 lines
757 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -x
|
|
|
|
# Attempt to start the less annoying fork
|
|
if [ -f /var/lib/flatpak/exports/bin/io.github.tdesktop_x64.TDesktop ]; then
|
|
flatpak run io.github.tdesktop_x64.TDesktop "$@"
|
|
elif [ -f ~/.local/share/flatpak/exports/bin/io.github.tdesktop_x64.TDesktop ]; then
|
|
flatpak run --user io.github.tdesktop_x64.TDesktop "$@"
|
|
# but if it's not installed, fallback to the official one
|
|
elif [ -f /usr/bin/telegram-desktop ]; then
|
|
/usr/bin/telegram-desktop "$@"
|
|
elif [ -f /var/lib/flatpak/exports/bin/org.telegram.desktop ]; then
|
|
flatpak run io.github.tdesktop_x64.TDesktop "$@"
|
|
elif [ -f ~/.local/share/flatpak/exports/bin/org.telegram.desktop ]; then
|
|
flatpak run --user org.telegram.desktop "$@"
|
|
else
|
|
print "Telegram not found :)"
|
|
fi
|
|
set +x
|