From a295ba44ba63dc1beac8ac7520cfcd49ef867602 Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Fri, 21 Nov 2008 01:36:50 +0000 Subject: [PATCH] tweaks --- inxi | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/inxi b/inxi index 955b01f..951b7bc 100755 --- a/inxi +++ b/inxi @@ -1040,7 +1040,9 @@ get_audio_data() cards[audioCard]++ while (getline && !/^$/) { if (/driver in use/) { - drivers[audioCard] = drivers[audioCard] gensub(/(.*): (.*)/,"\\2","g",$0) " " + + gsub(/^ +| +$/, "", audioCard) + drivers[audioCard] = drivers[audioCard] gensub(/(.*): (.*)/,"\\2","g",$0) "" } if (/I\/O/) { portsTemp = gensub(/\tI\/O ports at (.*) \[.*\]/,"\\1","g",$0) @@ -2204,7 +2206,7 @@ print_audio_data() if [[ $( wc -w <<< ${a_audio_working[2]} ) -gt 1 ]];then port_plural='s' fi - port_data="${C1}at port$port_plural${C2} ${a_audio_working[2]}" + port_data=" ${C1}at port$port_plural${C2} ${a_audio_working[2]}" fi audio_data="${C1}$card_one${C2}${a_audio_working[0]}$alsa_driver$port_data" audio_data=$( create_print_line "Audio:" "$audio_data" ) @@ -2227,7 +2229,7 @@ print_audio_data() if [[ $( wc -w <<< ${a_audio_working[2]} ) -gt 1 ]];then port_plural='s' fi - port_data="${C1}at port$port_plural${C2} ${a_audio_working[2]}" + port_data=" ${C1}at port$port_plural${C2} ${a_audio_working[2]}" fi if [[ -n ${a_audio_working[0]} ]];then audio_data="${C1}Card-$(( $i + 1 )) ${C2}${a_audio_working[0]}$alsa_driver$port_data"