mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
added arch support for -r option
This commit is contained in:
parent
e253aa3028
commit
5264341430
19
inxi
19
inxi
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
########################################################################
|
########################################################################
|
||||||
#### Script Name: inxi
|
#### Script Name: inxi
|
||||||
#### version: 1.3.5
|
#### version: 1.3.6
|
||||||
#### Date: January 31 2010
|
#### Date: January 31 2010
|
||||||
########################################################################
|
########################################################################
|
||||||
#### SPECIAL THANKS
|
#### SPECIAL THANKS
|
||||||
|
@ -3162,7 +3162,7 @@ get_partition_data_advanced()
|
||||||
get_repo_data()
|
get_repo_data()
|
||||||
{
|
{
|
||||||
eval $LOGFS
|
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 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/'
|
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 )"
|
REPO_DATA="$( echo -e $repo_data_working )"
|
||||||
# note that pacman/arch mirrorlist file has all the mirrors on it, so it
|
# 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
|
# 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
|
elif [[ -f $pacman_conf ]];then
|
||||||
# REPO_FILE_ID='arch repos'
|
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
|
fi
|
||||||
eval $LOGFE
|
eval $LOGFE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
get_runlevel_data()
|
get_runlevel_data()
|
||||||
{
|
{
|
||||||
eval $LOGFS
|
eval $LOGFS
|
||||||
|
|
Loading…
Reference in a new issue