From 5654a8bffd46f5968091b7afcb7685f2e107d9ad Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Wed, 8 Jun 2011 08:42:28 +0000 Subject: [PATCH] final bug fixes, if google svn ever starts working again --- inxi | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/inxi b/inxi index 56bab1c..3f193e0 100755 --- a/inxi +++ b/inxi @@ -5969,16 +5969,19 @@ 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 # but for laptops, or even falsely id'ed desktops with batteries, let's print it all if it matches - if [[ $B_LAPTOP != 'true' ]];then - if [[ -z ${A_MACHINE_DATA[0]} ]];then - b_skip_system='true' - # ibm / ibm can be true; dell / quantum is false, so in other words, only do this - # in case where the vendor is the same and the version is the same and not null, - # otherwise the version information is going to be different in all cases I think - elif [[ ${A_MACHINE_DATA[0]} == ${A_MACHINE_DATA[5]} ]];then - if [[ -n ${A_MACHINE_DATA[2]} && ${A_MACHINE_DATA[2]} == ${A_MACHINE_DATA[7]} ]] || \ - [[ -z ${A_MACHINE_DATA[2]} && ${A_MACHINE_DATA[1]} == ${A_MACHINE_DATA[6]} ]];then - b_skip_system='true' + # there can be false id laptops if battery appears so need to make sure system is filled + if [[ -z ${A_MACHINE_DATA[0]} ]];then + b_skip_system='true' + else + if [[ $B_LAPTOP != 'true' ]];then + # ibm / ibm can be true; dell / quantum is false, so in other words, only do this + # in case where the vendor is the same and the version is the same and not null, + # otherwise the version information is going to be different in all cases I think + if [[ -n ${A_MACHINE_DATA[0]} && ${A_MACHINE_DATA[0]} == ${A_MACHINE_DATA[5]} ]];then + if [[ -n ${A_MACHINE_DATA[2]} && ${A_MACHINE_DATA[2]} == ${A_MACHINE_DATA[7]} ]] || \ + [[ -z ${A_MACHINE_DATA[2]} && ${A_MACHINE_DATA[1]} == ${A_MACHINE_DATA[6]} ]];then + b_skip_system='true' + fi fi fi fi