[Fusionforge-commits] r12613 - trunk/src/utils

Olivier Berger olberger at fusionforge.org
Tue Mar 8 17:30:34 CET 2011


Author: olberger
Date: 2011-03-08 17:30:32 +0100 (Tue, 08 Mar 2011)
New Revision: 12613

Modified:
   trunk/src/utils/forge_get_config
Log:
add list-all-variables-values option to see all variables' values too

Modified: trunk/src/utils/forge_get_config
===================================================================
--- trunk/src/utils/forge_get_config	2011-03-08 16:12:00 UTC (rev 12612)
+++ trunk/src/utils/forge_get_config	2011-03-08 16:30:32 UTC (rev 12613)
@@ -44,6 +44,16 @@
 				print "$s/$v\n" ;
 			}
 		}
+	} elseif ($argv[1] == 'list-all-variables-values') {
+		$c = FusionForgeConfig::get_instance () ;
+		$sections = $c->get_sections() ;
+		foreach ($sections as $s) {
+			$variables = $c->get_variables($s) ;
+			foreach ($variables as $v) {
+				$value = forge_get_config ($v, $s);
+				print "$s/$v: $value\n" ;
+			}
+		}
 	} else {
 		$v = forge_get_config ($argv[1]) ;
 		if ($v === true) {
@@ -58,7 +68,8 @@
 For instance: .../forge-get-config web_host
               .../forge-get-config repo_prefix scmsvn
 
-Or:           .../forge-get-config list-all-variables
+Or:           .../forge-get-config list-all-variables, for all variables
+              .../forge-get-config list-all-variables-values, for all variables and their values
 " ;
         exit (1) ;
 }




More information about the Fusionforge-commits mailing list