aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Harder <radhermit@gentoo.org>2014-12-20 02:05:01 -0800
committerTim Harder <radhermit@gentoo.org>2014-12-20 02:06:02 -0800
commit6225b1fdb933487077903ac867bf71979da5045b (patch)
tree733c7a297e8dd10d3fd87d22cc0ff983c8a516d1 /src/_gentoo_repos
parent_gentoolkit: remove old revdep-rebuild util option (diff)
downloadzsh-completion-6225b1fdb933487077903ac867bf71979da5045b.tar.gz
zsh-completion-6225b1fdb933487077903ac867bf71979da5045b.tar.bz2
zsh-completion-6225b1fdb933487077903ac867bf71979da5045b.zip
_gentoo_repos: use more apt variable names
Diffstat (limited to 'src/_gentoo_repos')
-rw-r--r--src/_gentoo_repos26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/_gentoo_repos b/src/_gentoo_repos
index ff4136b..3419cdc 100644
--- a/src/_gentoo_repos
+++ b/src/_gentoo_repos
@@ -5,25 +5,25 @@
# _gentoo_repos -o -> returns the list of non-main repos (with PORTDIR_OVERLAY fallback)
_gentoo_repos() {
- local mainreponame mainrepopath overlayname overlaypath
+ local main_repo main_repo_path overlay overlay_path
if [[ -e /usr/share/portage/config/repos.conf ]]; then
if [[ ${1} == "-o" ]]; then
- for overlayname in $(_parsereposconf -l); do
- overlaypath+=($(_parsereposconf ${overlayname} location))
+ for overlay in $(_repos_conf -l); do
+ overlay_path+=($(_repos_conf ${overlay} location))
done
source /etc/make.conf 2>/dev/null
source /etc/portage/make.conf 2>/dev/null
- overlaypath+=(${(@)PORTDIR_OVERLAY})
+ overlay_path+=(${(@)PORTDIR_OVERLAY})
- echo "${(@u)overlaypath}"
+ echo "${(@u)overlay_path}"
else
- mainreponame=$(_parsereposconf DEFAULT main-repo)
- mainrepopath=$(_parsereposconf ${mainreponame} location)
+ main_repo=$(_repos_conf DEFAULT main-repo)
+ main_repo_path=$(_repos_conf ${main_repo} location)
- echo "${mainrepopath}"
+ echo "${main_repo_path}"
fi
else
source /usr/share/portage/config/make.globals 2>/dev/null
@@ -38,14 +38,14 @@ _gentoo_repos() {
fi
}
-_parsereposconf() {
- local v f insection section arr
+_repos_conf() {
+ local v file insection section arr
- for f in /usr/share/portage/config/repos.conf \
+ for file in /usr/share/portage/config/repos.conf \
/etc/portage/repos.conf \
/etc/portage/repos.conf/*.conf; do
- [[ -f ${f} ]] || continue
+ [[ -f ${file} ]] || continue
insection=0
declare -A arr
IFS='= '
@@ -70,7 +70,7 @@ _parsereposconf() {
fi
fi
continue
- done < ${f}
+ done < ${file}
done
if [[ ${1} == "-l" ]]; then