Show friendly warning if snapd didn't update snap right for some reason

This commit is contained in:
Ilya Fedin 2020-05-01 15:52:09 +04:00 committed by John Preston
parent b98f0933af
commit b79ecb5909
2 changed files with 23 additions and 1 deletions

16
snap/scripts/telegram-launch Executable file
View file

@ -0,0 +1,16 @@
#!/bin/sh
if [ ! -d $SNAP/kf5/usr ]; then
runtime="kde-frameworks-5-core18"
slot="kde-frameworks-5-core18:kde-frameworks-5-core18-slot"
echo "You need to connect this snap to the $runtime snap."
echo ""
echo "You can do this with those commands:"
echo "snap install $runtime"
echo "snap refresh $runtime"
echo "snap connect $SNAP_NAME:kde-frameworks-5-plug $slot"
exit 1
fi
exec telegram-desktop "$@"

View file

@ -15,7 +15,7 @@ architectures:
apps:
telegram-desktop:
command: telegram-desktop
command: telegram-launch
common-id: org.telegram.desktop
desktop: share/applications/telegramdesktop.desktop
environment:
@ -131,6 +131,12 @@ parts:
- range-v3
- xxhash
telegram-launcher:
plugin: dump
source: snap/scripts
organize:
telegram-launch: bin/telegram-launch
patches:
plugin: dump
source: Telegram/Patches