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

Linux: Fixes #5240: Remove dependency on lsb_release from install script (#5323)

Some platforms (notably OpenSuse) do not come with
the lsb_release binary, and don't need it to successfully
install Joplin.
This commit is contained in:
Caleb John 2021-08-18 04:01:58 -07:00 committed by GitHub
parent 4f5ad86028
commit cf0286d275
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -171,19 +171,23 @@ else
fi
DESKTOP=${DESKTOP,,} # convert to lower case
# Detect distribution environment
DISTVER=$(lsb_release -is) && DISTVER=$DISTVER$(lsb_release -rs)
DISTCODENAME=$(lsb_release -cs)
#-----------------------------------------------------
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
# Linux Mint 4 Debbie is based on Debian 10 and requires the same param handling.
if [ "$DISTVER" = "Debian10" ] || [ "$DISTVER" = "Linuxmint4" ] && [ "$DISTCODENAME" = "debbie" ]
then
SANDBOXPARAM=" --no-sandbox"
else
SANDBOXPARAM=""
# Detect distribution environment, and apply --no-sandbox fix
SANDBOXPARAM=""
# lsb_release isn't available on some platforms (e.g. opensuse)
# The equivalent of lsb_release in OpenSuse is the file /usr/lib/os-release
if command -v lsb_release &> /dev/null; then
DISTVER=$(lsb_release -is) && DISTVER=$DISTVER$(lsb_release -rs)
DISTCODENAME=$(lsb_release -cs)
#-----------------------------------------------------
# Check for "The SUID sandbox helper binary was found, but is not configured correctly" problem.
# It is present in Debian 1X. A (temporary) patch will be applied at .desktop file
# Linux Mint 4 Debbie is based on Debian 10 and requires the same param handling.
if [ $DISTVER =~ Debian1. ] || [ "$DISTVER" = "Linuxmint4" ] && [ "$DISTCODENAME" = "debbie" ]
then
SANDBOXPARAM=" --no-sandbox"
fi
fi
# Initially only desktop environments that were confirmed to use desktop files stored in