cleanup and printout fixes and tweaks

This commit is contained in:
inxi-svn 2011-06-08 04:12:35 +00:00
parent b589c9d5f7
commit 297f3c833b

6
inxi
View file

@ -5963,7 +5963,7 @@ print_machine_data()
if [[ ${#A_MACHINE_DATA[@]} -gt 0 ]];then if [[ ${#A_MACHINE_DATA[@]} -gt 0 ]];then
# note: in some case a mobo/version will match a product name/version, do not print those # 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 [[ -z ${A_MACHINE_DATA[0]} ]];then
b_skip_system='true' b_skip_system='true'
fi fi
@ -6018,7 +6018,7 @@ print_machine_data()
fi fi
mobo_line="${C1}Mobo${C2} $mobo_vendor ${C1}model${C2} $mobo_model$mobo_version$mobo_serial" 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" 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" mobo_line="$mobo_line $bios_line"
bios_line='' bios_line=''
fi fi
@ -6043,7 +6043,7 @@ print_machine_data()
product_serial=" ${C1}serial${C2} ${A_MACHINE_DATA[3]} " product_serial=" ${C1}serial${C2} ${A_MACHINE_DATA[3]} "
fi fi
system_line="${C1}System${C2} $system_vendor ${C1}product${C2} $product_name$product_version$product_serial" 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" system_line="$system_line $chassis_line"
chassis_line='' chassis_line=''
fi fi