[evolvis-commits] r14983: Added a tool to read config files and return a value (for scripts)
mirabilos at evolvis.org
mirabilos at evolvis.org
Mon Feb 28 23:33:29 CET 2011
Author: mirabilos
Date: 2011-02-28 23:33:29 +0100 (Mon, 28 Feb 2011)
New Revision: 14983
Added:
trunk/gforge_base/evolvisforge-5.1/gforge/utils/forge_get_config
Modified:
trunk/gforge_base/evolvisforge-5.1/gforge/packaging/install/common
Log:
Added a tool to read config files and return a value (for scripts)
Modified: trunk/gforge_base/evolvisforge-5.1/gforge/packaging/install/common
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge/packaging/install/common 2011-02-28 22:33:27 UTC (rev 14982)
+++ trunk/gforge_base/evolvisforge-5.1/gforge/packaging/install/common 2011-02-28 22:33:29 UTC (rev 14983)
@@ -11,6 +11,7 @@
utils/fill-in-the-blanks.pl usr/share/gforge/bin/
deb-specific/gforge-config usr/sbin/
utils/include.pl usr/share/gforge/lib/
+utils/forge_get_config usr/share/gforge/bin/
#
deb-specific/user_dump_update.pl usr/share/gforge/bin/
deb-specific/group_dump_update.pl usr/share/gforge/bin/
Added: trunk/gforge_base/evolvisforge-5.1/gforge/utils/forge_get_config
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge/utils/forge_get_config (rev 0)
+++ trunk/gforge_base/evolvisforge-5.1/gforge/utils/forge_get_config 2011-02-28 22:33:29 UTC (rev 14983)
@@ -0,0 +1,46 @@
+#! /usr/bin/php5 -f
+<?php
+/**
+ * FusionForge source control management
+ *
+ * Copyright 2009, Roland Mas
+ *
+ * This file is part of FusionForge.
+ *
+ * FusionForge is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published
+ * by the Free Software Foundation; either version 2 of the License,
+ * or (at your option) any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with FusionForge; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ */
+
+require (dirname(__FILE__).'/../www/env.inc.php');
+require_once $gfwww.'include/pre.php';
+
+if (count ($argv) == 3) {
+ echo forge_get_config ($argv[1], $argv[2]) . "\n" ;
+} elseif (count($argv) == 2) {
+ echo forge_get_config ($argv[1]) . "\n" ;
+} else {
+ echo "Usage: .../forge-get-config <variable> [ <section> ]
+For instance: .../forge-get-config web_host
+ .../forge-get-config repo_prefix scmsvn
+" ;
+ exit (1) ;
+}
+
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
+?>
More information about the evolvis-commits
mailing list