(No Version Change)

Tweaked get distro lsb data a bit to avoid confusion in the future, but no change to handling.
This commit is contained in:
inxi-svn 2008-11-11 03:15:27 +00:00
parent 11e38953c4
commit 17031b8f10

8
inxi
View file

@ -1074,11 +1074,12 @@ get_distro_data()
echo "$distro"
}
# args: $1 - optional, app, uses the app test, not being used now
get_distro_lsb_data()
{
local distro=''
if [[ -f /etc/lsb-release ]];then
if [[ -f /etc/lsb-release && $1 != 'app' ]];then
distro=$( gawk -F '=' '
{ IGNORECASE=1 }
@ -1097,8 +1098,9 @@ get_distro_lsb_data()
END {
print distroId " " distroRelease " (" distroCodename ")"
}' /etc/lsb-release )
fi
# this is HORRIBLY slow, but I don't know why, it runs fast in shell
# elif [[ -n $( which lsb_release ) ]];then
# if [[ -n $( which lsb_release ) && $1 == 'app' ]];then
# distro=$( echo "$( lsb_release -irc )" | gawk '
# { IGNORECASE=1 }
# /^Distributor ID/ {
@ -1116,7 +1118,7 @@ get_distro_lsb_data()
# END {
# print distroId " " distroRelease " (" distroCodename ")"
# }' )
fi
# fi
echo $distro
}