mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
bug fix for pardus pisi line output, added file missing detection for arch repos
This commit is contained in:
parent
e4f8bacf31
commit
e7e2a381a9
16
inxi
16
inxi
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
########################################################################
|
||||
#### Script Name: inxi
|
||||
#### version: 1.3.7
|
||||
#### version: 1.3.8
|
||||
#### Date: February 1 2010
|
||||
########################################################################
|
||||
#### SPECIAL THANKS
|
||||
|
@ -3249,8 +3249,14 @@ $repo_data_working"
|
|||
# putting it back into the <data>:<url> format print repos expects to see
|
||||
while read repo_line
|
||||
do
|
||||
# dump empty lines...
|
||||
repo_line=$( sed 's|^[[:space:]]$||g' <<< $repo_line )
|
||||
repo_line=$( gawk '
|
||||
{
|
||||
# need to dump leading/trailing spaces and change [,] to (, ) for irc output
|
||||
sub(/^[[:space:]]+|[[:space:]]+$/,"",$0)
|
||||
gsub(/\[/,"(",$0)
|
||||
gsub(/\]/,")",$0)
|
||||
print $0
|
||||
}' <<< $repo_line )
|
||||
if [[ -n $( grep '://' <<< $repo_line ) ]];then
|
||||
repo_data_working="$repo_data_working:$repo_line\n"
|
||||
else
|
||||
|
@ -3278,6 +3284,7 @@ $repo_data_working"
|
|||
repo_data_working="$repo_data_working $pacman_conf"
|
||||
for repo_file in $repo_data_working
|
||||
do
|
||||
if [[ -f $repo_file ]];then
|
||||
# inserting a new line after each found / processed match
|
||||
repo_data_working2="$repo_data_working2$( gawk -v repoFile=$repo_file '
|
||||
BEGIN {
|
||||
|
@ -3289,6 +3296,9 @@ $repo_data_working"
|
|||
print repoFile ":" $2 "\\n"
|
||||
}
|
||||
' $repo_file )"
|
||||
else
|
||||
echo "Error: file listed in $pacman_conf does not exist - $repo_file"
|
||||
fi
|
||||
done
|
||||
# execute line breaks
|
||||
REPO_DATA="$( echo -e $repo_data_working2 )"
|
||||
|
|
Loading…
Reference in a new issue