summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-12-10 20:02:15 +0000
committerMike Frysinger <vapier@gentoo.org>2005-12-10 20:02:15 +0000
commit7b500f559f8b186c6018b68299de2c8089f5a177 (patch)
tree7d29201eb1660f39735b2f33ad5f77d1fe7dad68
parentce84d1127388ab87882b79cefecca6aa6d32db18 (diff)
downloadportage-7b500f559f8b186c6018b68299de2c8089f5a177.tar.gz
portage-7b500f559f8b186c6018b68299de2c8089f5a177.tar.bz2
portage-7b500f559f8b186c6018b68299de2c8089f5a177.zip
add a -v (verbose) option to envvar for easily generating output for use in bash scripts
svn path=/main/trunk/; revision=2359
-rwxr-xr-xbin/portageq10
1 files changed, 9 insertions, 1 deletions
diff --git a/bin/portageq b/bin/portageq
index f93ba7dea..9ed78b337 100755
--- a/bin/portageq
+++ b/bin/portageq
@@ -194,8 +194,16 @@ def envvar(argv):
Returns a specific environment variable as exists prior to ebuild.sh.
Similar to: emerge --verbose --info | egrep '^<variable>='
"""
+ if (argv[0] == "-v"):
+ verbose=1
+ argv=argv[1:]
+ else:
+ verbose=0
for arg in argv:
- print portage.settings[arg]
+ if verbose:
+ print arg +"='"+ portage.settings[arg] +"'"
+ else:
+ print portage.settings[arg]
#-----------------------------------------------------------------------------