small output fix for networking card, single card case

This commit is contained in:
inxi-svn 2008-10-31 06:44:25 +00:00
parent b1e4762e7d
commit b5416695eb

7
inxi
View file

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
######################################################################## ########################################################################
#### Script Name: inxi #### Script Name: inxi
#### version: 0.2.13 #### version: 0.2.14
#### Date: October 30 2008 #### Date: October 30 2008
######################################################################## ########################################################################
#### inxi is a fork of infobash, the original bash sys info script by locsmif #### inxi is a fork of infobash, the original bash sys info script by locsmif
@ -1360,15 +1360,14 @@ print_intro_data()
print_networking_data() print_networking_data()
{ {
local i='' card_plural='s' card_one='Card-1 ' network_data='' local i='' card_one='Card-1 ' network_data=''
# set A_NETWORK_DATA # set A_NETWORK_DATA
get_networking_data get_networking_data
if [[ -n ${A_NETWORK_DATA[@]} ]];then if [[ -n ${A_NETWORK_DATA[@]} ]];then
if [[ ${#A_NETWORK_DATA[@]} -le 1 ]];then if [[ ${#A_NETWORK_DATA[@]} -le 1 ]];then
card_plural='' card_one='Card'
card_one=''
fi fi
i=0 i=0
network_data=$( create_print_line "Network:" "${C1}$card_one${C2}${A_NETWORK_DATA[i]}" ) network_data=$( create_print_line "Network:" "${C1}$card_one${C2}${A_NETWORK_DATA[i]}" )