fixed pardus/pisi sources collection to fit with new method, new tarball, no new version number

This commit is contained in:
inxi-svn 2012-12-22 04:39:52 +00:00
parent f2fbe65485
commit f60b86253f

16
inxi
View file

@ -6011,11 +6011,13 @@ get_raid_data()
# Repos will be added as we get distro package manager data to create the repo data.
# This method will output the file name also, which is useful to create output that's
# neat and readable.
# neat and readable. Each line of the total number contains the following sections,
# separated by a : for splitting in the print function
# part one, repo type/string : part two, file name, if present, of info : part 3, repo data
get_repo_data()
{
eval $LOGFS
local repo_file='' repo_data_working='' repo_data_working2='' repo_line='' repo_type='unknown'
local repo_file='' repo_data_working='' repo_data_working2='' repo_line=''
local apt_file='/etc/apt/sources.list' yum_repo_dir='/etc/yum.repos.d/' yum_conf='/etc/yum.conf'
local pacman_conf='/etc/pacman.conf' pacman_repo_dir='/etc/pacman.d/' pisi_dir='/etc/pisi/'
@ -6105,6 +6107,12 @@ $repo_data_working"
# now we need to create the structure: repo info: repo path
# we do that by looping through the lines of the output and then
# putting it back into the <data>:<url> format print repos expects to see
# note this structure in the data, so store first line and make start of line
# then when it's an http line, add it, and create the full line collection.
# Pardus-2009.1 [Aktiv]
# http://packages.pardus.org.tr/pardus-2009.1/pisi-index.xml.bz2
# Contrib [Aktiv]
# http://packages.pardus.org.tr/contrib-2009/pisi-index.xml.bz2
while read repo_line
do
repo_line=$( gawk '
@ -6116,9 +6124,9 @@ $repo_data_working"
print $0
}' <<< $repo_line )
if [[ -n $( grep '://' <<< $repo_line ) ]];then
repo_data_working="pisi repos:$repo_data_working:$repo_line\n"
repo_data_working="$repo_data_working:$repo_line\n"
else
repo_data_working="$repo_data_working$repo_line"
repo_data_working="${repo_data_working}pisi repo:$repo_line"
fi
done <<< "$REPO_DATA"
# echo and execute the line breaks inserted