Detection script changes
This commit is contained in:
@@ -2,7 +2,24 @@
|
||||
|
||||
DISTNAME=unknown
|
||||
DISTVER=
|
||||
if [ -f /etc/solus-release ]; then
|
||||
|
||||
function resetDistVer {
|
||||
DISTNAME=unknown
|
||||
DISTVER=
|
||||
}
|
||||
|
||||
if [ -f /etc/fedora-release ]; then
|
||||
. /etc/os-release
|
||||
if [ "$VERSION_ID" == "29" ]; then
|
||||
DISTNAME=fedora
|
||||
DISTVER=29
|
||||
elif [ "$VERSION_ID" == "28" ]; then
|
||||
DISTNAME=fedora
|
||||
DISTVER=28
|
||||
else
|
||||
resetDistVer
|
||||
fi
|
||||
elif [ -f /etc/solus-release ]; then
|
||||
DISTNAME=solus
|
||||
elif [ -f /etc/lsb-release ]; then
|
||||
. /etc/lsb-release
|
||||
@@ -13,33 +30,37 @@ elif [ -f /etc/lsb-release ]; then
|
||||
if [ "$DISTVER" = "19" ] || [ "$DISTVER" = "19.1" ]; then
|
||||
DISTNAME=ubuntu
|
||||
DISTVER=18.04
|
||||
else
|
||||
resetDistVer
|
||||
fi
|
||||
elif [ "$DISTNAME" = "elementary" ]; then
|
||||
if [ "$DISTVER" = "5.0" ]; then
|
||||
DISTNAME=ubuntu
|
||||
DISTVER=18.04
|
||||
else
|
||||
resetDistVer
|
||||
fi
|
||||
else
|
||||
DISTNAME=unknown
|
||||
DISTVER=
|
||||
resetDistVer
|
||||
fi
|
||||
else
|
||||
resetDistVer
|
||||
fi
|
||||
elif [ -f /etc/debian_version ]; then
|
||||
DISTNAME=debian
|
||||
DISTVER=$(head -1 /etc/debian_version|awk -F. '{print $1}')
|
||||
if [ "$DISTVER" != "9" ]; then
|
||||
resetDistVer
|
||||
fi
|
||||
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
|
||||
elif [ "$VERSION_ID" == "28" ]; then
|
||||
DISTNAME=fedora
|
||||
DISTVER=28
|
||||
fi
|
||||
else
|
||||
resetDistVer
|
||||
fi
|
||||
else
|
||||
resetDistVer
|
||||
fi
|
||||
|
||||
echo ${DISTNAME}${DISTVER}
|
||||
|
||||
Reference in New Issue
Block a user