added arch support for -r option

This commit is contained in:
inxi-svn 2010-02-01 05:51:09 +00:00
parent e253aa3028
commit 5264341430

19
inxi
View file

@ -1,7 +1,7 @@
#!/bin/bash
########################################################################
#### Script Name: inxi
#### version: 1.3.5
#### version: 1.3.6
#### Date: January 31 2010
########################################################################
#### SPECIAL THANKS
@ -3162,7 +3162,7 @@ get_partition_data_advanced()
get_repo_data()
{
eval $LOGFS
local repo_file='' repo_data_working=''
local repo_file='' repo_data_working='' repo_data_working2=''
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/'
@ -3259,13 +3259,22 @@ $repo_data_working"
REPO_DATA="$( echo -e $repo_data_working )"
# note that pacman/arch mirrorlist file has all the mirrors on it, so it
# won't work for this feature, the output would be largely meaningless, and far too long
# elif [[ -f $pacman_file || -d $pacman_repo_dir ]];then
# REPO_FILE_ID='arch repos'
elif [[ -f $pacman_conf ]];then
REPO_FILE_ID='arch repos'
# get list of mirror include files, trim white space off ends
repo_data_working="$( grep -Ei '^Include' $pacman_conf | grep -vi 'IncludePath' | cut -d '=' -f 2 | sed 's|^[[:space:]]$||g' )"
repo_data_working=$( sort -bu <<< "$repo_data_working" | uniq )
repo_data_working="$repo_data_working $pacman_conf"
for repo_file in $repo_data_working
do
# inserting a new line after each found / processed match
repo_data_working2="$repo_data_working2$( grep -i '^Server' $repo_file | cut -d '=' -f 2 | sed 's|^[[:space:]]$||g' | sed -r 's|(.*)|'$repo_file':\1\\n|' )"
done
REPO_DATA="$( echo -e $repo_data_working2 )"
fi
eval $LOGFE
}
get_runlevel_data()
{
eval $LOGFS