1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-21 09:38:01 +02:00

Update Joplin_install_and_update.sh (#4609)

This commit is contained in:
dartero 2021-03-11 15:47:18 +01:00 committed by GitHub
parent a1423e4851
commit 5c04c06d6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -160,8 +160,19 @@ else
fi
DESKTOP=${DESKTOP,,} # convert to lower case
# Detect distribution environment
DISTVER=$(lsb_release -is) && DISTVER=$DISTVER$(lsb_release -rs)
#-----------------------------------------------------
echo 'Create Desktop icon...'
# Check for "The SUID sandbox helper binary was found, but is not configured correctly" problem.
# It is present in Debian 10 Buster. A (temporary) patch will be applied at .desktop file
if [ "$DISTVER" = "Debian10" ]
then
SANDBOXPARAM=" --no-sandbox"
else
SANDBOXPARAM=""
fi
# 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
@ -177,7 +188,7 @@ then
# On some systems this directory doesn't exist by default
mkdir -p ~/.local/share/applications
echo -e "[Desktop Entry]\nEncoding=UTF-8\nName=Joplin\nComment=Joplin for Desktop\nExec=${HOME}/.joplin/Joplin.AppImage\nIcon=joplin\nStartupWMClass=Joplin\nType=Application\nCategories=Office;" >> ~/.local/share/applications/appimagekit-joplin.desktop
echo -e "[Desktop Entry]\nEncoding=UTF-8\nName=Joplin\nComment=Joplin for Desktop\nExec=${HOME}/.joplin/Joplin.AppImage${SANDBOXPARAM}\nIcon=joplin\nStartupWMClass=Joplin\nType=Application\nCategories=Office;" >> ~/.local/share/applications/appimagekit-joplin.desktop
# Update application icons
[[ `command -v update-desktop-database` ]] && update-desktop-database ~/.local/share/applications && update-desktop-database ~/.local/share/icons
print "${COLOR_GREEN}OK${COLOR_RESET}"