svn: /phpdoc/doc-base/trunk/scripts/ build-chms.php
| From: | Kalle Sommer Nielsen | Date: | Mon, 17 Jan 2011 05:10:35 +0000 |
| Subject: | svn: /phpdoc/doc-base/trunk/scripts/ build-chms.php | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-7653@lists.php.net to get a copy of this message | ||
kalle Mon, 17 Jan 2011 05:10:35 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=307525
Log:
Sync the chm build script
- Various fixes here and there
- Enables phpdoc/zh in the build
Changed paths:
U phpdoc/doc-base/trunk/scripts/build-chms.php
Modified: phpdoc/doc-base/trunk/scripts/build-chms.php
===================================================================
--- phpdoc/doc-base/trunk/scripts/build-chms.php 2011-01-16 22:24:51 UTC (rev 307524)
+++ phpdoc/doc-base/trunk/scripts/build-chms.php 2011-01-17 05:10:35 UTC (rev 307525)
@@ -20,11 +20,6 @@
* $Id$
*/
- /**
- * TODO
- *
- * @todo Check the following languages, as they generate bugged CHMS: de, es, fa, fr, pl, pt_BR,
ro
- */
/**
* This script is based off the original build.chms.bat
@@ -62,7 +57,8 @@
'pl', /* Polish */
'pt_BR', /* Brazilian Portuguese */
'ro', /* Romanian */
- 'tr' /* Turkish */
+ 'tr', /* Turkish */
+ 'zh' /* Chinese (Simplified) */
);
/**
@@ -144,7 +140,8 @@
/**
* Anything smaller than ~5MB is broken. Common broken sizes are 2MB and 15K. Common good size
are 10-12MB.
*/
- if (filesize(PATH_DOC . '\\tmp\\' . $lang . '\\php-chm\\php_manual_' . $lang
. '.chm') < 5000000) {
+ if (filesize(PATH_DOC . '\\tmp\\' . $lang . '\\php-chm\\php_manual_' . $lang
. '.chm') < 5000000)
+ {
echo('- Build error: CHM file too small, something went wrong.' . PHP_EOL);
continue;
@@ -163,7 +160,7 @@
/**
* Update the CHM on the rsync server
*/
- execute_task('- rsync', PATH_SCP, '-batch -q -i "' . PATH_PPK .
'" -l bjori "' . PATH_DOC . '\\chmfiles\\php_manual_' . $lang .
'.chm" rsync.php.net:/home/bjori/manual-chms-new/', 'rsync_' . $lang);
+ execute_task('- rsync', PATH_SCP, ' -batch -v -i "' . PATH_PPK .
'" -l bjori "' . PATH_DOC . '\\chmfiles\\php_manual_' . $lang .
'.chm" rsync.php.net:/home/bjori/manual-chms-new/', 'rsync_' . $lang);
/**
* Cleanup
@@ -200,12 +197,20 @@
if($program == PATH_SCP)
{
- $log = false;
+ ob_start();
+
+ $log_file = $log;
+ $log = false;
}
$cmd = sprintf('"%s"%s%s', $program, (!$parameters ?: ' ' .
$parameters), (!$log ? '' : ' > ' . PATH_LOG . '\\' . $log .
'.log 2<&1'));
@popen($cmd, 'r');
+
+ if($program == PATH_SCP)
+ {
+ file_put_contents($log_file, ob_get_clean());
+ }
}
/**