From 0ad78fd38e8cd956ccda8388674c93e45f991db6 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Sun, 14 Nov 2021 22:17:42 +0100 Subject: [PATCH] change file only if already existing --- installSpotify.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/installSpotify.sh b/installSpotify.sh index 9243083..ca3e36a 100644 --- a/installSpotify.sh +++ b/installSpotify.sh @@ -20,4 +20,6 @@ sudo make install cd .. rm -rf spotify-adblock # We replace the Ubuntu desktop shortcut -sudo sed -i "7s#.*#Exec=env LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify %U#" /usr/share/applications/spotify.desktop +if [ -f /usr/share/applications/spotify.desktop ] ; then + sudo sed -i "7s#.*#Exec=env LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify %U#" /usr/share/applications/spotify.desktop +fi