From de5bc45300ffe853667820fcca564182acd737b4 Mon Sep 17 00:00:00 2001 From: Caleb John Date: Wed, 27 Jan 2021 14:45:49 -0700 Subject: [PATCH] Change the Desktop check in the linux update script (#4405) --- Joplin_install_and_update.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Joplin_install_and_update.sh b/Joplin_install_and_update.sh index 6f5c15f6a..ba1337218 100755 --- a/Joplin_install_and_update.sh +++ b/Joplin_install_and_update.sh @@ -162,7 +162,15 @@ DESKTOP=${DESKTOP,,} # convert to lower case #----------------------------------------------------- echo 'Create Desktop icon...' -if [[ $DESKTOP =~ .*gnome.*|.*kde.*|.*xfce.*|.*mate.*|.*lxqt.*|.*unity.*|.*x-cinnamon.*|.*deepin.*|.*pantheon.*|.*lxde.*|.*i3.*|.*sway.* ]] +# Initially only desktop environments that were confirmed to use desktop files stored in +# `.local/share/desktop` had a desktop file created. +# However some environments don't return a desktop BUT still support these desktop files +# the command check was added to support all Desktops that have support for the +# freedesktop standard +# The old checks are left in place for historical reasons, but +# NO MORE DESKTOP ENVIRONMENTS SHOULD BE ADDED +# If a new environment needs to be supported, then the command check section should be re-thought +if [[ $DESKTOP =~ .*gnome.*|.*kde.*|.*xfce.*|.*mate.*|.*lxqt.*|.*unity.*|.*x-cinnamon.*|.*deepin.*|.*pantheon.*|.*lxde.*|.*i3.*|.*sway.* ]] || [[ `command -v update-desktop-database` ]] then # Only delete the desktop file if it will be replaced rm -f ~/.local/share/applications/appimagekit-joplin.desktop