From d519d13c02795de13e959111c7573e1dc6e76086 Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Sat, 17 Nov 2012 23:22:19 +0000 Subject: [PATCH] new tarball, last patch, now globally strip out (x86_64/i686 type data too --- inxi | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/inxi b/inxi index e1d99dc..5c46e0b 100755 --- a/inxi +++ b/inxi @@ -3685,7 +3685,7 @@ get_distro_data() fi fi fi - + if [[ ${#distro} -gt 80 ]] && [[ $B_HANDLE_CORRUPT_DATA != 'true' ]];then distro="${RED}/etc/${distro_file} corrupted, use -% to override${NORMAL}" fi @@ -3711,7 +3711,16 @@ get_distro_data() distro='unknown' fi fi - + # final step cleanup of unwanted information + # opensuse has the x86 etc type string in names, not needed as redundant since -S already shows that + distro=$( gawk ' + BEGIN { + IGNORECASE=1 + } + { + sub(/ *\((x86_64|i486|i586|i686|686|586|486)\)/, "", $0) + print $0 + }' <<< $distro ) echo "$distro" log_function_data "distro: $distro" eval $LOGFE @@ -3849,8 +3858,6 @@ get_lsb_os_release_data() } } - # opensuse has the x86 string in names, not needed as redundant - sub(/ *\(x86_64\)| *\(686\)/, "", distroName) print distroName } ' $FILE_OS_RELEASE )