diff --git a/snap/local/launch.sh b/snap/local/launch.sh index 9388308..48e97a1 100755 --- a/snap/local/launch.sh +++ b/snap/local/launch.sh @@ -1,10 +1,11 @@ #!/bin/sh # Make sure a link to desktop launcher is added to the autostart dir -autostart_dir="$SNAP_USER_DATA/.config/autostart" -if [ ! -d "$autostart_dir" ]; then - mkdir -p "$autostart_dir" - ln -sfnt "$autostart_dir/" "$SNAP/share/applications/indicator-sound-switcher.desktop" -fi + +AUTOSTART="$SNAP_USER_DATA/.config/autostart/" + +mkdir -p "$AUTOSTART" + +ln -sfnt "$AUTOSTART" "$SNAP/share/applications/indicator-sound-switcher.desktop" exec "$@" diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index c2b3045..b3447fb 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -14,6 +14,7 @@ description: | icon: icons/indicator-sound-switcher.svg license: GPL-3.0 +grade: stable confinement: strict apps: @@ -29,7 +30,6 @@ apps: parts: indicator-sound-switcher: plugin: python - python-version: python3 source: . build-packages: - gettext @@ -46,8 +46,8 @@ parts: # Use version from setup.py version="$(sed -ne 's/\s*APP_VERSION\s*=\s*\x27\([^\x27]\+\)\x27.*/\1/p' setup.py)" + snapcraftctl set-version "$version" - snapcraftctl set-grade "stable" # Fix icon path in the .desktop sed -i -E 's!^Icon=.*!Icon=/usr/share/icons/hicolor/scalable/status/indicator-sound-switcher.svg!' indicator-sound-switcher.desktop @@ -59,5 +59,5 @@ parts: icons: usr/share/icons/hicolor/scalable/status snap/local/launch.sh: bin/ stage: - - usr/ - - bin/ + - usr/* + - bin/*