Fix Ubuntu 19.10 detection

This commit is contained in:
2019-11-27 11:19:46 -06:00
parent ddf2ef84c0
commit 661d33cd54
4 changed files with 86 additions and 124 deletions

View File

@@ -10,7 +10,7 @@ resetDistVer() {
if [ -f /etc/centos-release ]; then
. /etc/os-release
if [ "$VERSION_ID" == "7" ]; then
if [ "$VERSION_ID" = "7" ]; then
DISTNAME=centos
DISTVER=7
else
@@ -18,13 +18,13 @@ if [ -f /etc/centos-release ]; then
fi
elif [ -f /etc/fedora-release ]; then
. /etc/os-release
if [ "$VERSION_ID" == "30" ]; then
if [ "$VERSION_ID" = "30" ]; then
DISTNAME=fedora
DISTVER=30
elif [ "$VERSION_ID" == "29" ]; then
elif [ "$VERSION_ID" = "29" ]; then
DISTNAME=fedora
DISTVER=29
elif [ "$VERSION_ID" == "28" ]; then
elif [ "$VERSION_ID" = "28" ]; then
DISTNAME=fedora
DISTVER=28
else
@@ -54,6 +54,8 @@ elif [ -f /etc/lsb-release ]; then
else
resetDistVer
fi
elif [ "$DISTVER" = "19.10" ]; then
DISTVER=19.04
fi
elif [ -f /etc/debian_version ]; then
DISTNAME=debian
@@ -65,25 +67,25 @@ elif [ -f /etc/debian_version ]; then
fi
fi
if [ "$DISTNAME" == "unknown" ]; then
if [ "$DISTNAME" = "unknown" ]; then
if [ -f /etc/os-release ]; then
. /etc/os-release
if [ "$ID" == "arch" ]; then
if [ "$ID" = "arch" ]; then
DISTNAME=arch
elif [ "$ID" == "antergos" ] || [ "$ID" == "manjaro" ]; then
elif [ "$ID" = "antergos" ] || [ "$ID" = "manjaro" ]; then
DISTNAME=ubuntu
DISTVER=18.10
elif [ "$ID" == "opensuse-leap" ]; then
if [ "$VERSION_ID" == "15.0" ]; then
elif [ "$ID" = "opensuse-leap" ]; then
if [ "$VERSION_ID" = "15.0" ]; then
DISTNAME=opensuse
DISTVER=15
elif [ "$VERSION_ID" == "15.1" ]; then
elif [ "$VERSION_ID" = "15.1" ]; then
DISTNAME=opensuse
DISTVER=15.1
else
resetDistVer
fi
elif [ "$ID" == "opensuse-tumbleweed" ]; then
elif [ "$ID" = "opensuse-tumbleweed" ]; then
DISTNAME=tumbleweed
DISTVER=
else