Fix Ubuntu detection

This commit is contained in:
Scott E. Graves
2019-04-11 21:34:39 -05:00
parent 0946f44c70
commit 903b43743d

View File

@@ -9,6 +9,7 @@ elif [ -f /etc/lsb-release ]; then
. /etc/lsb-release . /etc/lsb-release
DISTNAME=$(echo ${DISTRIB_ID} | awk '{print tolower($0)}') DISTNAME=$(echo ${DISTRIB_ID} | awk '{print tolower($0)}')
DISTVER=${DISTRIB_RELEASE} DISTVER=${DISTRIB_RELEASE}
if [ "$DISTNAME" != "ubuntu" ]; then
if [ "$DISTNAME" = "linuxmint" ]; then if [ "$DISTNAME" = "linuxmint" ]; then
if [ "$DISTVER" = "19" ] || [ "$DISTVER" = "19.1" ]; then if [ "$DISTVER" = "19" ] || [ "$DISTVER" = "19.1" ]; then
DISTNAME=ubuntu DISTNAME=ubuntu
@@ -23,6 +24,7 @@ elif [ -f /etc/lsb-release ]; then
DISTNAME=unknown DISTNAME=unknown
DISTVER= DISTVER=
fi fi
fi
elif [ -f /etc/debian_version ]; then elif [ -f /etc/debian_version ]; then
DISTNAME=debian DISTNAME=debian
DISTVER=$(head -1 /etc/debian_version|awk -F. '{print $1}') DISTVER=$(head -1 /etc/debian_version|awk -F. '{print $1}')