From 17031b8f107df1eaae43a0a61703c5852b2af5fd Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Tue, 11 Nov 2008 03:15:27 +0000 Subject: [PATCH] (No Version Change) Tweaked get distro lsb data a bit to avoid confusion in the future, but no change to handling. --- inxi | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/inxi b/inxi index 0bf3acf..0236e52 100755 --- a/inxi +++ b/inxi @@ -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 }