From 903b43743d3e5a2210b7c166ebc37eb2abdd8ad1 Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Thu, 11 Apr 2019 21:34:39 -0500 Subject: [PATCH] Fix Ubuntu detection --- public/detect_linux.sh | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/public/detect_linux.sh b/public/detect_linux.sh index 122681e..155c216 100644 --- a/public/detect_linux.sh +++ b/public/detect_linux.sh @@ -9,19 +9,21 @@ elif [ -f /etc/lsb-release ]; then . /etc/lsb-release DISTNAME=$(echo ${DISTRIB_ID} | awk '{print tolower($0)}') DISTVER=${DISTRIB_RELEASE} - if [ "$DISTNAME" = "linuxmint" ]; then - if [ "$DISTVER" = "19" ] || [ "$DISTVER" = "19.1" ]; then - DISTNAME=ubuntu - DISTVER=18.04 + if [ "$DISTNAME" != "ubuntu" ]; then + if [ "$DISTNAME" = "linuxmint" ]; then + if [ "$DISTVER" = "19" ] || [ "$DISTVER" = "19.1" ]; then + DISTNAME=ubuntu + DISTVER=18.04 + fi + elif [ "$DISTNAME" = "elementary" ]; then + if [ "$DISTVER" = "5.0" ]; then + DISTNAME=ubuntu + DISTVER=18.04 + fi + else + DISTNAME=unknown + DISTVER= fi - elif [ "$DISTNAME" = "elementary" ]; then - if [ "$DISTVER" = "5.0" ]; then - DISTNAME=ubuntu - DISTVER=18.04 - fi - else - DISTNAME=unknown - DISTVER= fi elif [ -f /etc/debian_version ]; then DISTNAME=debian