small bug fix with null partitions array print out

This commit is contained in:
inxi-svn 2014-04-01 22:09:29 +00:00
parent a1d4e0be88
commit b49c7fa48b

13
inxi
View file

@ -8908,6 +8908,7 @@ get_weather_data()
# args: $1 - string to strip color code characters out of # args: $1 - string to strip color code characters out of
# returns count of string length minus colors # returns count of string length minus colors
# note; this cleanup may not be working on bsd sed
calculate_line_length() calculate_line_length()
{ {
local string=$1 local string=$1
@ -10526,14 +10527,14 @@ print_networking_ip_data()
if_string='' if_string=''
fi fi
else else
if [[ $( calculate_line_length "$if_string_holding$if_string" ) -lt $COLS_INNER ]];then if [[ $( calculate_line_length "$if_string_holding$if_string" ) -gt $COLS_INNER ]];then
if_string_holding="$if_string_holding$if_string"
else
if [[ -n $if_string_holding ]];then if [[ -n $if_string_holding ]];then
full_string=$( create_print_line " " "$if_string_holding${CN}" ) full_string=$( create_print_line " " "$if_string_holding${CN}" )
print_screen_output "$full_string" print_screen_output "$full_string"
fi fi
if_string_holding="$if_string" if_string_holding="$if_string"
else
if_string_holding="$if_string_holding$if_string"
fi fi
fi fi
((i++)) ((i++))
@ -10843,8 +10844,10 @@ print_partition_data()
else else
line_starter=' ' line_starter=' '
fi fi
partition_data=$( create_print_line "$line_starter" "${a_partition_data[$i]}${CN}" ) if [[ -n ${a_partition_data[$i]} ]];then
print_screen_output "$partition_data" partition_data=$( create_print_line "$line_starter" "${a_partition_data[$i]}${CN}" )
print_screen_output "$partition_data"
fi
done done
eval $LOGFE eval $LOGFE