added some comments

This commit is contained in:
inxi-svn 2010-02-01 06:20:42 +00:00
parent 19191c50e8
commit 95dc7d47db

6
inxi
View file

@ -3166,9 +3166,11 @@ get_repo_data()
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/'
# apt - debian, buntus
if [[ -f $apt_file || -d $apt_file.d ]];then
REPO_DATA="$( grep -Esv '(^[[:space:]]*$|^[[:space:]]*#)' $apt_file $apt_file.d/*.list )"
REPO_FILE_ID='apt sources'
# yum - fedora, redhat, centos, etc
elif [[ -d $yum_repo_dir || -f $yum_conf ]];then
# older redhats put their yum data in /etc/yum.conf
for repo_file in $( ls $yum_repo_dir*.repo $yum_conf 2>/dev/null )
@ -3239,6 +3241,7 @@ $repo_data_working"
fi
done
REPO_FILE_ID='yum repos'
# pisi - pardus
elif [[ -d $pisi_dir && -n $( type -p pisi ) ]];then
REPO_DATA="$( pisi list-repo )"
REPO_FILE_ID='pisi repo'
@ -3256,7 +3259,8 @@ $repo_data_working"
fi
done <<< "$REPO_DATA"
# echo and execute the line breaks inserted
REPO_DATA="$( echo -e $repo_data_working )"
REPO_DATA="$( echo -e $repo_data_working )"
# pacman - archlinux
elif [[ -f $pacman_conf ]];then
REPO_FILE_ID='arch repo servers'
# get list of mirror include files, trim white space off ends