bjori Tue Aug 7 20:52:10 2007 UTC
Modified files:
/phd build.php
Log:
Don't hardcode these paths
# In the "future" the config.php file should be used
http://cvs.php.net/viewvc.cgi/phd/build.php?r1=1.7&r2=1.8&diff_format=u
Index: phd/build.php
diff -u phd/build.php:1.7 phd/build.php:1.8
--- phd/build.php:1.7 Tue Aug 7 20:10:09 2007
+++ phd/build.php Tue Aug 7 20:52:09 2007
@@ -1,6 +1,16 @@
-#!/home/bjori/.apps/bin/php
<?php
-/* $Id: build.php,v 1.7 2007/08/07 20:10:09 bjori Exp $ */
+/* $Id: build.php,v 1.8 2007/08/07 20:52:09 bjori Exp $ */
+
+if (isset($argc) && $argc == 3) {
+ $manual = $argv[1];
+ $version = $argv[2];
+} else if (file_exists("./config.php")) {
+ include "./config.php";
+}
+if (!file_exists($manual) || !file_exists($version)) {
+ die ("Missing path/to .manual.xml and/or version.xml");
+}
+
function err($no, $str, $file, $line) {
global $notify;
@@ -40,8 +50,8 @@
->show();
}
-$reader = new PhDReader("/home/bjori/php/doc/.manual.xml");
-$format = new phpweb($reader, $IDs, $IDMap,
"/home/bjori/php/doc/phpbook/phpbook-xsl/version.xml");
+$reader = new PhDReader($manual);
+$format = new phpweb($reader, $IDs, $IDMap, $version);
$map = $format->getMap();