[prev in list] [next in list] [prev in thread] [next in thread]
List: pear-doc
Subject: [PEAR-DOC] svn: /pear/peardoc/trunk/scripts/ pearwebbuild.php
From: Christian_Weiske <cweiske () php ! net>
Date: 2009-11-28 14:26:42
Message-ID: svn-cweiske-1259418402-291384-964962259 () svn ! php ! net
[Download RAW message or body]
cweiske Sat, 28 Nov 2009 14:26:42 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=291384
Log:
add --norender option (does not work fully when activaed)
Changed paths:
U pear/peardoc/trunk/scripts/pearwebbuild.php
Modified: pear/peardoc/trunk/scripts/pearwebbuild.php
===================================================================
--- pear/peardoc/trunk/scripts/pearwebbuild.php 2009-11-28 13:52:33 UTC (rev 291383)
+++ pear/peardoc/trunk/scripts/pearwebbuild.php 2009-11-28 14:26:42 UTC (rev 291384)
@@ -48,6 +48,11 @@
'description' => 'Full path to HTML Help compiler executable',
'action' => 'StoreString'
));
+$parser->addOption('norender', array(
+ 'long_name' => '--norender',
+ 'description' => 'Do not render HTML, assume it already exists',
+ 'action' => 'StoreTrue'
+));
try {
$cmdline = $parser->parse();
@@ -87,11 +92,17 @@
passthru('rm -rf build/ && mkdir build');
logAndEcho("Starting Build\n".date('Y-m-d H:i:s'));
+$render = !$cmdline->options['norender'];
$langs = glob('??{,_??}', GLOB_ONLYDIR | GLOB_BRACE);
-
+$langs = array('en');
foreach ($langs as $lang) {
logAndEcho("Building peardoc/$lang with php configure.php --lang=$lang");
- exec("$php_executable configure.php --no-display-untranslated --lang=$lang", \
$output, $return); + if ($render) {
+ exec("$php_executable configure.php --no-display-untranslated --lang=$lang", \
$output, $return); + } else {
+ logAndEcho(' Skipping configure call');
+ $return = 0;
+ }
if ($return == 0) {
logAndEcho("Now running phd for $lang");
@@ -99,20 +110,24 @@
$extracopyfiles = '';
//bightml
- logAndEcho(' Rendering all pear themes');
- shell_exec("$phd_executable -L $lang -f xhtml -t pear -o build/$lang -d \
.manual.xml" . $tobuildlog); + if ($render) {
+ logAndEcho(' Rendering all pear themes');
+ shell_exec("$phd_executable -L $lang -P PEAR -o build/$lang -d \
.manual.xml" . $tobuildlog); + } else {
+ logAndEcho(' Skipping rendering');
+ }
// bzip2
logAndEcho(' Bzipping pearbightml downloadable file');
passthru('bzip2'
- . ' ' . escapeshellarg("build/$lang/pear_manual_en.html")
+ . ' ' . escapeshellarg("build/$lang/pear-bigxhtml.html")
. ' --stdout'
. ' > ' . escapeshellarg("build/$lang/pear_manual_$lang.html.bz2")
);
// gz
passthru('gzip'
- . ' ' . escapeshellarg("build/$lang/pear_manual_en.html")
+ . ' ' . escapeshellarg("build/$lang/pear-bigxhtml.html")
. ' --stdout'
. ' > ' . escapeshellarg("build/$lang/pear_manual_$lang.html.gz")
);
@@ -131,7 +146,7 @@
// tar.bz2
passthru(
- "cd build/$lang/ && mv html pear_manual_$lang && "
+ "cd build/$lang/ && mv pear-chunked-xhtml pear_manual_$lang && "
. 'tar cj --to-stdout'
. ' ' . escapeshellarg("pear_manual_$lang")
. ' > '
@@ -156,8 +171,12 @@
//pearweb package tocs
if ($lang == 'en') {
- logAndEcho(' Building pearweb package tocs');
- shell_exec("$php_executable scripts/pearwebpackagetocs.php" . \
$tobuildlog); + if ($render) {
+ logAndEcho(' Building pearweb package tocs');
+ shell_exec("$php_executable scripts/pearwebpackagetocs.php" . \
$tobuildlog); + } else {
+ logAndEcho(' Skipping rendering pearweb package tocs');
+ }
}
@@ -181,14 +200,19 @@
if ($cmdline->options['hhc']) {
// we need to chmod the chm dir since the html help compiler
// is being run as an own user
- logAndEcho(' Compiling chm manual');
- passthru(
- "chmod og+w build/$lang/chm && "
- . "cd build/$lang/chm && "
- . $cmdline->options['hhc']
- . ' pear_manual_' . $lang . '.hhp'
- . $tobuildlog
- );
+ if ($render) {
+ logAndEcho(' Compiling chm manual');
+ passthru(
+ "chmod og+w build/$lang/pear-chm && "
+ . "cd build/$lang/pear-chm && "
+ . $cmdline->options['hhc']
+ . ' pear_manual_' . $lang . '.hhp'
+ . $tobuildlog
+ );
+ } else {
+ logAndEcho(' Skipping compiling chm manual');
+ }
+
$chmfile = "build/$lang/chm/pear_manual_$lang.chm";
if (file_exists($chmfile)) {
$extracopyfiles .= ' ' . escapeshellarg($chmfile);
--
PEAR Documentation List Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic