mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
logic cleanup in printout function for hdd data
This commit is contained in:
parent
2229da51b6
commit
3a91faffee
7
inxi
7
inxi
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
########################################################################
|
||||
#### Script Name: inxi
|
||||
#### version: 1.1.12
|
||||
#### version: 1.1.13
|
||||
#### Date: August 6 2009
|
||||
########################################################################
|
||||
#### SPECIAL THANKS
|
||||
|
@ -3945,7 +3945,7 @@ print_hard_disk_data()
|
|||
local hdd_capacity=${a_hdd_basic_working[0]}
|
||||
local hdd_used=${a_hdd_basic_working[1]}
|
||||
|
||||
if [[ $VERBOSITY_LEVEL -ge 3 ]] || [[ $B_SHOW_DISK == 'true' ]];then
|
||||
if [[ $VERBOSITY_LEVEL -ge 3 || $B_SHOW_DISK == 'true' ]];then
|
||||
## note: the output part of this should be in the print hdd data function, not here
|
||||
get_hard_drive_data_advanced
|
||||
for (( i=0; i < ${#A_HDD_DATA[@]} - 1; i++ ))
|
||||
|
@ -3974,8 +3974,6 @@ print_hard_disk_data()
|
|||
divisor=2 # for modulus line print out, either 2 items for full, or default for short
|
||||
fi
|
||||
hdd_name="${a_hdd_working[2]}"
|
||||
|
||||
if [[ $B_SHOW_DISK == 'true' || $VERBOSITY_LEVEL -ge 3 ]];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 new lines according to $divisor setting, and after, if leftovers, print that line.
|
||||
|
@ -3994,7 +3992,6 @@ print_hard_disk_data()
|
|||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
# then print any leftover items
|
||||
if [[ -n $hdd_model ]];then
|
||||
|
|
Loading…
Reference in a new issue