cvs: peardoc /scripts pearwebbuild.php
| From: | Brett Bieber | Date: | Wed, 03 Dec 2008 22:50:05 +0000 |
| Subject: | cvs: peardoc /scripts pearwebbuild.php | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-11305@lists.php.net to get a copy of this message | ||
saltybeagle Wed Dec 3 22:50:05 2008 UTC
Modified files:
/peardoc/scripts pearwebbuild.php
Log:
Make it easier to adjust the pear, phd, and php excutables used and use the cli php executable by
default.
http://cvs.php.net/viewvc.cgi/peardoc/scripts/pearwebbuild.php?r1=1.3&r2=1.4&diff_format=u
Index: peardoc/scripts/pearwebbuild.php
diff -u peardoc/scripts/pearwebbuild.php:1.3 peardoc/scripts/pearwebbuild.php:1.4
--- peardoc/scripts/pearwebbuild.php:1.3 Mon Dec 1 22:27:14 2008
+++ peardoc/scripts/pearwebbuild.php Wed Dec 3 22:50:04 2008
@@ -10,6 +10,14 @@
*/
$cwd = getcwd();
+$php_executable = 'php';
+$phd_executable = 'phd';
+$pear_executable = 'pear';
+
+if (isset($_SERVER['_'])) {
+ $php_executable = $_SERVER['_'];
+}
+
if (isset($_SERVER['argv'], $_SERVER['argv'][1])
&& $_SERVER['argv'][1] == 'updatecvs') {
chdir(dirname(dirname(dirname(__FILE__))));
@@ -24,7 +32,7 @@
// Update cvs
shell_exec('cvs -d :pserver:cvsread@cvs.php.net:/repository checkout phd');
// Update phd
- shell_exec('pear upgrade -f
'.dirname(dirname(dirname(__FILE__))).'/phd/package.xml');
+ shell_exec($pear_executable.' upgrade -f
'.dirname(dirname(dirname(__FILE__))).'/phd/package.xml');
}
@unlink(dirname(__FILE__).'/build.log');
@@ -35,16 +43,16 @@
foreach (array('de', 'en', 'es', 'fr', 'hu',
'ja', 'nl', 'pl', 'ru') as $lang) {
logAndEcho("Building peardoc/$lang with php configure.php --lang=$lang");
- exec("php configure.php --lang=$lang", $output, $return);
+ exec("$php_executable configure.php --lang=$lang", $output, $return);
if ($return == 0) {
if ($lang == 'en') {
logAndEcho("Building pearweb package tocs");
- shell_exec("php scripts/pearwebpackagetocs.php >> scripts/build.log");
+ shell_exec("$php_executable scripts/pearwebpackagetocs.php >>
scripts/build.log");
}
logAndEcho("Now running phd for $lang");
- shell_exec("phd -f xhtml -t pearbightml -o build/$lang -d giant.xml >>
scripts/build.log");
+ shell_exec("$phd_executable -f xhtml -t pearbightml -o build/$lang -d giant.xml
>> scripts/build.log");
logAndEcho('Creating pearbightml downloadable file');
@@ -57,7 +65,7 @@
// Remove the .phar
@unlink("build/$lang/pear_manual_$lang.html.phar");
- shell_exec("phd -f xhtml -t pearchunkedhtml -o build/$lang -d giant.xml >>
scripts/build.log");
+ shell_exec("$phd_executable -f xhtml -t pearchunkedhtml -o build/$lang -d giant.xml
>> scripts/build.log");
$zipfilename = "build/$lang/pear_manual_$lang.phar";
@@ -73,10 +81,10 @@
// Remove the .phar
@unlink("build/$lang/pear_manual_$lang.phar");
- shell_exec("phd -f xhtml -t pearweb -o build/$lang -d giant.xml >>
scripts/build.log");
+ shell_exec("$phd_executable -f xhtml -t pearweb -o build/$lang -d giant.xml >>
scripts/build.log");
// Remove chm build until we can get a chm compiler going.
- //shell_exec("phd -f xhtml -t pearchm -o build/$lang -d giant.xml >>
scripts/build.log");
+ //shell_exec("$phd_executable -f xhtml -t pearchm -o build/$lang -d giant.xml >>
scripts/build.log");
logAndEcho("Finished peardoc/$lang");
}