From d2f36ba0e0cc9f7e250364bc705d403880bf0a38 Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Thu, 30 Oct 2008 07:28:43 +0000 Subject: [PATCH] fixed ordering of multicard assembler for print --- inxi | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/inxi b/inxi index 748d528..ec82481 100755 --- a/inxi +++ b/inxi @@ -1194,18 +1194,19 @@ print_cpu_data() print_gfx_data() { local gfx_data='' i='' card_one='Card ' - - gfx_data=$( create_print_line "Graphics:" "${C1}$card_one${C2}${A_GFX_DATA[0]}" ) + if [[ ${#A_GFX_DATA[@]} -gt 1 ]] then i=1 while [[ -n ${A_GFX_DATA[i]} && $i -le 3 ]] do - gfx_data="${gfx_data} ${C1}Card-$(($i+1))${C2} ${A_GFX_DATA[i]} " + gfx_data=" ${C1}Card-$(($i+1))${C2} ${A_GFX_DATA[i]} " ((i++)) done card_one='Card-1 ' fi + gfx_data=$( create_print_line "Graphics:" "${C1}$card_one${C2}${A_GFX_DATA[0]}${gfx_data} " ) + if [ "$X" -gt 0 ] then gfx_data="${gfx_data} ${CN}| ${C1}$X_VENDOR${C2} $X_VER_NUM ${CN}| ${C1}Res${C2} ${RES}"