commit:     6225b1fdb933487077903ac867bf71979da5045b
Author:     Tim Harder <radhermit <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 20 10:05:01 2014 +0000
Commit:     Tim Harder <radhermit <AT> gentoo <DOT> org>
CommitDate: Sat Dec 20 10:06:02 2014 +0000
URL:        
http://sources.gentoo.org/gitweb/?p=proj/zsh-completion.git;a=commit;h=6225b1fd

_gentoo_repos: use more apt variable names

---
 src/_gentoo_repos | 26 +++++++++++++-------------
 1 file 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

Reply via email to