fixed bug with pardus pisi output, stripping out colors

This commit is contained in:
inxi-svn 2010-02-01 18:32:15 +00:00
parent e7e2a381a9
commit c1dff27d83

8
inxi
View file

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
######################################################################## ########################################################################
#### Script Name: inxi #### Script Name: inxi
#### version: 1.3.8 #### version: 1.3.9
#### Date: February 1 2010 #### Date: February 1 2010
######################################################################## ########################################################################
#### SPECIAL THANKS #### SPECIAL THANKS
@ -3251,10 +3251,10 @@ $repo_data_working"
do do
repo_line=$( gawk ' repo_line=$( gawk '
{ {
# need to dump leading/trailing spaces and change [,] to (, ) for irc output # need to dump leading/trailing spaces and clear out color codes for irc output
sub(/^[[:space:]]+|[[:space:]]+$/,"",$0) sub(/^[[:space:]]+|[[:space:]]+$/,"",$0)
gsub(/\[/,"(",$0) # gsub(/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]/,"",$0) # leaving this pattern in case need it
gsub(/\]/,")",$0) gsub(/\[([0-9];)?[0-9]+m/,"",$0)
print $0 print $0
}' <<< $repo_line ) }' <<< $repo_line )
if [[ -n $( grep '://' <<< $repo_line ) ]];then if [[ -n $( grep '://' <<< $repo_line ) ]];then