add a -v (verbose) option to envvar for easily generating output for use in bash...
authorMike Frysinger <vapier@gentoo.org>
Sat, 10 Dec 2005 20:02:15 +0000 (20:02 -0000)
committerMike Frysinger <vapier@gentoo.org>
Sat, 10 Dec 2005 20:02:15 +0000 (20:02 -0000)
svn path=/main/trunk/; revision=2359

bin/portageq

index f93ba7dea78233cd69378a4ee619bc94c2110744..9ed78b337fa34eda0953e2e824638f8a961ebcf2 100755 (executable)
@@ -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]
 
 
 #-----------------------------------------------------------------------------