More output cleanup, more consistent and easy to read hopefullyO

This commit is contained in:
inxi-svn 2008-10-29 23:12:28 +00:00
parent 9da615b89b
commit 1a23eb245e

16
inxi
View file

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
######################################################################## ########################################################################
#### Script Name: inxi #### Script Name: inxi
#### version: 0.1.38 #### version: 0.1.39
#### Date: October 29 2008 #### Date: October 29 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
@ -93,7 +93,7 @@ SCRIPT_NAME="inxi"
SCRIPT_PATH=$( dirname $0 ) SCRIPT_PATH=$( dirname $0 )
SCRIPT_VERSION_NUMBER=$( grep -im 1 'version:' $SCRIPT_PATH/$SCRIPT_NAME | awk '{print $3}' ) SCRIPT_VERSION_NUMBER=$( grep -im 1 'version:' $SCRIPT_PATH/$SCRIPT_NAME | awk '{print $3}' )
SCRIPT_DATE=$( grep -im 1 'date:' $SCRIPT_PATH/$SCRIPT_NAME | awk '{print $3 " " $4 ", " $5}' ) SCRIPT_DATE=$( grep -im 1 'date:' $SCRIPT_PATH/$SCRIPT_NAME | awk '{print $3 " " $4 ", " $5}' )
MY_VERSION="$SCRIPT_NAME v:$SCRIPT_VERSION_NUMBER" SCRIPT_VERSION="$SCRIPT_NAME v:$SCRIPT_VERSION_NUMBER"
KONVI_CFG="konversation/scripts/$SCRIPT_NAME.conf" # relative path to $(kde-config --path data) KONVI_CFG="konversation/scripts/$SCRIPT_NAME.conf" # relative path to $(kde-config --path data)
## Script Localization ## Script Localization
@ -1194,10 +1194,10 @@ print_gfx_data()
i=1 i=1
while [[ -n ${GFX[i]} && $i -le 3 ]] while [[ -n ${GFX[i]} && $i -le 3 ]]
do do
gfx_data=$( echo -ne " ${C1}$(($i+1))${C2} ${GFX[i]} " ) gfx_data=$( echo -ne " ${C1}Card-$(($i+1))${C2} ${GFX[i]} " )
(( i++ )) (( i++ ))
done done
card_one='(1)' card_one='Card-1'
fi fi
gfx_data=$( create_print_line "Graphics:" "${C1}$card_one${C2} ${A_GFX_DATA[0]}${gfx_data}" ) gfx_data=$( create_print_line "Graphics:" "${C1}$card_one${C2} ${A_GFX_DATA[0]}${gfx_data}" )
if [ "$X" -gt 0 ] if [ "$X" -gt 0 ]
@ -1256,7 +1256,7 @@ print_intro_data()
print_networking_data() print_networking_data()
{ {
local i='' card_plural='s' card_one='(1) ' network_data='' local i='' card_plural='s' card_one='Card-1 ' network_data=''
if [[ -n ${A_NETWORK_DATA[@]} ]] if [[ -n ${A_NETWORK_DATA[@]} ]]
then then
@ -1270,7 +1270,7 @@ print_networking_data()
print_screen_output "$network_data" print_screen_output "$network_data"
while [[ -n ${A_NETWORK_DATA[++i]} ]] while [[ -n ${A_NETWORK_DATA[++i]} ]]
do do
network_data=$( create_print_line " " "${C1}($(($i+1)))${C2} ${A_NETWORK_DATA[i]}" ) network_data=$( create_print_line " " "${C1}Card-$(($i+1))${C2} ${A_NETWORK_DATA[i]}" )
print_screen_output "$network_data" print_screen_output "$network_data"
done done
fi fi
@ -1310,7 +1310,7 @@ print_short_data()
then then
short_data="${short_data}$( echo -ne " ${C1}Client${CN}[${C2}${IRC_CLIENT}${IRC_CLIENT_VERSION}${CN}]" )" short_data="${short_data}$( echo -ne " ${C1}Client${CN}[${C2}${IRC_CLIENT}${IRC_CLIENT_VERSION}${CN}]" )"
fi fi
short_data="${short_data} ${C1}${MY_VERSION}${CN}" short_data="${short_data} | ${C1}${SCRIPT_VERSION}${CN}"
if [ "$SCHEME" -gt 0 ] if [ "$SCHEME" -gt 0 ]
then then
short_data="${short_data}$( echo -ne "$NORMAL" )" short_data="${short_data}$( echo -ne "$NORMAL" )"
@ -1335,7 +1335,7 @@ print_system_data()
then then
system_data="${system_data}$( echo -ne " | ${C1}Client${C2} ${IRC_CLIENT}${IRC_CLIENT_VERSION}${CN}" )" system_data="${system_data}$( echo -ne " | ${C1}Client${C2} ${IRC_CLIENT}${IRC_CLIENT_VERSION}${CN}" )"
fi fi
system_data="${system_data}$( echo -ne " | ${C1}${MY_VERSION}" )" system_data="${system_data}$( echo -ne " | ${C1}${SCRIPT_VERSION}" )"
if [ "$SCHEME" -gt 0 ] if [ "$SCHEME" -gt 0 ]
then then