From 9c27241efd94e779f6992243889131b81a7a98a8 Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Wed, 29 Oct 2008 07:29:17 +0000 Subject: [PATCH] try at bug fix for dual output of graphics line --- inxi | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/inxi b/inxi index 09280ec..b69bf82 100755 --- a/inxi +++ b/inxi @@ -1,7 +1,7 @@ #!/bin/bash ######################################################################## #### Script Name: inxi -#### version: 0.1.30 +#### version: 0.1.31 #### Date: October 28 2008 ######################################################################## #### inxi is a fork of infobash, the original bash sys info script by locsmif @@ -1182,12 +1182,15 @@ print_it_out() fi done - i=1 - while [[ -n ${GFX[i]} && $i -le 3 ]] - do - long_gfx=$( echo -ne " ${C1}Card $(($i+1))${C2} ${GFX[i]} " ) - (( i++ )) - done + if [[ ${#GFX[@]} -gt 1 ]] + then + i=1 + while [[ -n ${GFX[i]} && $i -le 3 ]] + do + long_gfx=$( echo -ne " ${C1}Card $(($i+1))${C2} ${GFX[i]} " ) + (( i++ )) + done + fi long_gfx=$( printf "${C1}%-${INDENT}s${C2} %s" "Graphics Info" "${C1}Card 1${C2} ${GFX[0]}${long_gfx}" ) if ((X)) then