DistroInventory Clean-up output

This commit is contained in:
2023-11-20 00:31:09 +01:00
parent 7ba0441568
commit 0f2d7a825a

View File

@@ -213,11 +213,14 @@ UpgradeRelease () {
ParseOSRelease()
{
if [ ! -z "$OSRELEASE" ]; then
DISTRO=$(printf "$OSRELEASE" | awk -F= '$1=="ID" { print $2 ;}')
DISTRO=$(printf "$OSRELEASE" | awk -F= '$1=="ID" { print $2 ;}' |tr -d '"')
VERSION=$(printf "$OSRELEASE" | awk -F= '$1=="VERSION_ID" { print $2 ;}' |tr -d '"')
VERSIONNAME=$(printf "$OSRELEASE" | awk -F= '$1=="VERSION_CODENAME" { print $2 ;}')
VERSIONNAME=$(printf "$OSRELEASE" | awk -F= '$1=="VERSION_CODENAME" { print $2 ;}' |tr -d '"')
#PRETTYNAME=$(printf "$OSRELEASE" | awk -F= '$1=="PRETTY_NAME" { print $2 ;}' |tr -d '"' | cut -d "(" -f2 | cut -d ")" -f1)
if [ ! -z "$VERSIONNAME" ]; then
VERSION="$VERSION ($VERSIONNAME)"
#elif [ ! -z "$PRETTYNAME" ]; then
# VERSION="$VERSION ($PRETTYNAME)"
fi
else
if [ -z ${DISTRO+x} ]; then local DISTRO=N/A;fi