From d8231b66540cbff9a9b090c949a54e13f1956198 Mon Sep 17 00:00:00 2001 From: eth481642 Date: Thu, 4 Aug 2022 19:50:33 +0900 Subject: [PATCH 1/4] Update launch.sh --- snap/local/launch.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/snap/local/launch.sh b/snap/local/launch.sh index 9388308..9f194fc 100755 --- a/snap/local/launch.sh +++ b/snap/local/launch.sh @@ -1,10 +1,13 @@ #!/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" + +AUTOSTART="$SNAP_USER_DATA/.config/autostart" + +if [ ! -d "$AUTOSTART" ]; then + mkdir -p "$AUTOSTART" fi +ln -sfnt "$AUTOSTART/" "$SNAP/share/applications/indicator-sound-switcher.desktop" + exec "$@" From bcc44edaa16dc8ef8ac085b4c49e9dbb10305f6e Mon Sep 17 00:00:00 2001 From: eth481642 Date: Thu, 4 Aug 2022 19:54:45 +0900 Subject: [PATCH 2/4] Update snapcraft.yaml --- snap/snapcraft.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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/* From 8f1f7fb1ed2328d799635386f5797b6bb07a4942 Mon Sep 17 00:00:00 2001 From: eth481642 Date: Thu, 4 Aug 2022 23:15:19 +0900 Subject: [PATCH 3/4] Update launch.sh --- snap/local/launch.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/snap/local/launch.sh b/snap/local/launch.sh index 9f194fc..f5a3509 100755 --- a/snap/local/launch.sh +++ b/snap/local/launch.sh @@ -2,12 +2,12 @@ # Make sure a link to desktop launcher is added to the autostart dir -AUTOSTART="$SNAP_USER_DATA/.config/autostart" +AUTOSTART="$SNAP_USER_DATA/.config/autostart/" if [ ! -d "$AUTOSTART" ]; then mkdir -p "$AUTOSTART" fi -ln -sfnt "$AUTOSTART/" "$SNAP/share/applications/indicator-sound-switcher.desktop" +ln -sfnt "$AUTOSTART" "$SNAP/share/applications/indicator-sound-switcher.desktop" exec "$@" From 5e138e0759355ea430830baa2af08353eb98d34a Mon Sep 17 00:00:00 2001 From: eth481642 Date: Fri, 5 Aug 2022 23:49:34 +0900 Subject: [PATCH 4/4] Update snap/local/launch.sh Co-authored-by: Dmitry Kann --- snap/local/launch.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/snap/local/launch.sh b/snap/local/launch.sh index f5a3509..48e97a1 100755 --- a/snap/local/launch.sh +++ b/snap/local/launch.sh @@ -4,9 +4,7 @@ AUTOSTART="$SNAP_USER_DATA/.config/autostart/" -if [ ! -d "$AUTOSTART" ]; then - mkdir -p "$AUTOSTART" -fi +mkdir -p "$AUTOSTART" ln -sfnt "$AUTOSTART" "$SNAP/share/applications/indicator-sound-switcher.desktop"