From 297f3c833bbf1c4e29f01adb25d84853cf79062b Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Wed, 8 Jun 2011 04:12:35 +0000 Subject: [PATCH] cleanup and printout fixes and tweaks --- inxi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inxi b/inxi index 5028209..0a524e3 100755 --- a/inxi +++ b/inxi @@ -5963,7 +5963,7 @@ print_machine_data() if [[ ${#A_MACHINE_DATA[@]} -gt 0 ]];then # note: in some case a mobo/version will match a product name/version, do not print those - if [[ -n ${A_MACHINE_DATA[1]} && -n ${A_MACHINE_DATA[5]} && ${A_MACHINE_DATA[1]} == ${A_MACHINE_DATA[5]} ]] || \ + if [[ -n ${A_MACHINE_DATA[1]} && -n ${A_MACHINE_DATA[6]} && ${A_MACHINE_DATA[1]} == ${A_MACHINE_DATA[6]} ]] || \ [[ -z ${A_MACHINE_DATA[0]} ]];then b_skip_system='true' fi @@ -6018,7 +6018,7 @@ print_machine_data() fi mobo_line="${C1}Mobo${C2} $mobo_vendor ${C1}model${C2} $mobo_model$mobo_version$mobo_serial" bios_line="${C1}Bios${C2} $bios_vendor ${C1}version${C2} $bios_version ${C1}date${C2} $bios_date" - if [[ $( wc -c <<< "$mobo_line$bios_line" ) -lt $line_max ]];then + if [[ -n $mobo_line && -n $bios_line && $( wc -c <<< "$mobo_line$bios_line" ) -lt $line_max ]];then mobo_line="$mobo_line $bios_line" bios_line='' fi @@ -6043,7 +6043,7 @@ print_machine_data() product_serial=" ${C1}serial${C2} ${A_MACHINE_DATA[3]} " fi system_line="${C1}System${C2} $system_vendor ${C1}product${C2} $product_name$product_version$product_serial" - if [[ $( wc -c <<< "$system_line$chassis_line" ) -lt $line_max ]];then + if [[ -n $system_line && -n $chassis_line && $( wc -c <<< "$system_line$chassis_line" ) -lt $line_max ]];then system_line="$system_line $chassis_line" chassis_line='' fi