mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
added some comments
This commit is contained in:
parent
19191c50e8
commit
95dc7d47db
6
inxi
6
inxi
|
@ -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 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/'
|
||||||
|
|
||||||
|
# apt - debian, buntus
|
||||||
if [[ -f $apt_file || -d $apt_file.d ]];then
|
if [[ -f $apt_file || -d $apt_file.d ]];then
|
||||||
REPO_DATA="$( grep -Esv '(^[[:space:]]*$|^[[:space:]]*#)' $apt_file $apt_file.d/*.list )"
|
REPO_DATA="$( grep -Esv '(^[[:space:]]*$|^[[:space:]]*#)' $apt_file $apt_file.d/*.list )"
|
||||||
REPO_FILE_ID='apt sources'
|
REPO_FILE_ID='apt sources'
|
||||||
|
# yum - fedora, redhat, centos, etc
|
||||||
elif [[ -d $yum_repo_dir || -f $yum_conf ]];then
|
elif [[ -d $yum_repo_dir || -f $yum_conf ]];then
|
||||||
# older redhats put their yum data in /etc/yum.conf
|
# older redhats put their yum data in /etc/yum.conf
|
||||||
for repo_file in $( ls $yum_repo_dir*.repo $yum_conf 2>/dev/null )
|
for repo_file in $( ls $yum_repo_dir*.repo $yum_conf 2>/dev/null )
|
||||||
|
@ -3239,6 +3241,7 @@ $repo_data_working"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
REPO_FILE_ID='yum repos'
|
REPO_FILE_ID='yum repos'
|
||||||
|
# pisi - pardus
|
||||||
elif [[ -d $pisi_dir && -n $( type -p pisi ) ]];then
|
elif [[ -d $pisi_dir && -n $( type -p pisi ) ]];then
|
||||||
REPO_DATA="$( pisi list-repo )"
|
REPO_DATA="$( pisi list-repo )"
|
||||||
REPO_FILE_ID='pisi repo'
|
REPO_FILE_ID='pisi repo'
|
||||||
|
@ -3256,7 +3259,8 @@ $repo_data_working"
|
||||||
fi
|
fi
|
||||||
done <<< "$REPO_DATA"
|
done <<< "$REPO_DATA"
|
||||||
# echo and execute the line breaks inserted
|
# 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
|
elif [[ -f $pacman_conf ]];then
|
||||||
REPO_FILE_ID='arch repo servers'
|
REPO_FILE_ID='arch repo servers'
|
||||||
# get list of mirror include files, trim white space off ends
|
# get list of mirror include files, trim white space off ends
|
||||||
|
|
Loading…
Reference in a new issue