From 8768c2b0dd34d4c40d032a77fde3d1f2d24c306f Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Fri, 7 Aug 2009 00:07:41 +0000 Subject: [PATCH] code cleanup --- inxi | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/inxi b/inxi index 3e29046..3e5e8df 100755 --- a/inxi +++ b/inxi @@ -3963,19 +3963,17 @@ print_hard_disk_data() dev_data="/dev/${a_hdd_working[0]} " size_data=" ${a_hdd_working[1]}" hdd_name="${a_hdd_working[2]}" - fi - if [[ $B_EXTRA_DATA == 'true' && -n $dev_data ]];then - hdd_temp_data=$( get_hdd_temp_data "$dev_data" ) - # error handling is done in get data function - if [[ -n $hdd_temp_data ]];then - hdd_temp_data=" ${hdd_temp_data}C" - else - hdd_temp_data='' + if [[ $B_EXTRA_DATA == 'true' && -n $dev_data ]];then + hdd_temp_data=$( get_hdd_temp_data "$dev_data" ) + # error handling is done in get data function + if [[ -n $hdd_temp_data ]];then + hdd_temp_data=" ${hdd_temp_data}C" + else + hdd_temp_data='' + fi fi - fi - if [[ $B_SHOW_DISK == 'true' ]];then hdd_string="$usb_data$dev_data$hdd_name$size_data$hdd_temp_data" hdd_model="${hdd_model}${C1}$(($i+1)):${C2} $hdd_string " # printing line one, then every other line, and after, if leftovers, print that line.