From f60b86253f3dbc77777e22de7c1bf3d74e608d2c Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Sat, 22 Dec 2012 04:39:52 +0000 Subject: [PATCH] fixed pardus/pisi sources collection to fit with new method, new tarball, no new version number --- inxi | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/inxi b/inxi index f4198a6..f8481f7 100755 --- a/inxi +++ b/inxi @@ -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 : 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