Fix detection

This commit is contained in:
Scott E. Graves
2019-04-18 21:36:42 -05:00
parent 52c4130d35
commit 74c7490575

View File

@@ -2,23 +2,9 @@
DISTNAME=unknown DISTNAME=unknown
DISTVER= DISTVER=
if [ -f /etc/solus-release ]; then
if [ -f /etc/os-release ]; then
. /etc/os-release
if [ "$ID" == "arch" ]; then
DISTNAME=arch
elif [ "$ID" == "fedora" ]; then
if [ "$VERSION_ID" == "29" ]; then
DISTNAME=fedora
DISTVER=29
fi
fi
fi
if [ "DISTNAME" = "unknown" ]; then
if [ -f /etc/solus-release ]; then
DISTNAME=solus DISTNAME=solus
elif [ -f /etc/lsb-release ]; then 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}
@@ -38,9 +24,18 @@ if [ "DISTNAME" = "unknown" ]; then
DISTVER= DISTVER=
fi 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}')
elif [ -f /etc/os-release ]; then
. /etc/os-release
if [ "$ID" == "arch" ]; then
DISTNAME=arch
elif [ "$ID" == "fedora" ]; then
if [ "$VERSION_ID" == "29" ]; then
DISTNAME=fedora
DISTVER=29
fi
fi fi
fi fi