cvs: phpdoc / configure.php
| From: | Hannes Magnusson | Date: | Mon, 07 Apr 2008 07:44:58 +0000 |
| Subject: | cvs: phpdoc / configure.php | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-1436@lists.php.net to get a copy of this message | ||
bjori Mon Apr 7 07:44:58 2008 UTC
Modified files:
/phpdoc configure.php
Log:
Add a warning when passing --partial without an argument
http://cvs.php.net/viewvc.cgi/phpdoc/configure.php?r1=1.48&r2=1.49&diff_format=u
Index: phpdoc/configure.php
diff -u phpdoc/configure.php:1.48 phpdoc/configure.php:1.49
--- phpdoc/configure.php:1.48 Thu Mar 6 23:31:49 2008
+++ phpdoc/configure.php Mon Apr 7 07:44:58 2008
@@ -19,11 +19,11 @@
| Gwynne Raskind <gwynne@php.net> |
+----------------------------------------------------------------------+
- $Id: configure.php,v 1.48 2008/03/06 23:31:49 ezyang Exp $
+ $Id: configure.php,v 1.49 2008/04/07 07:44:58 bjori Exp $
*/
error_reporting(E_ALL);
-$cvs_id = '$Id: configure.php,v 1.48 2008/03/06 23:31:49 ezyang Exp $';
+$cvs_id = '$Id: configure.php,v 1.49 2008/04/07 07:44:58 bjori Exp $';
echo "configure.php: $cvs_id\n";
@@ -59,6 +59,14 @@
HELPCHUNK;
} // }}}
+function errbox($msg) {
+ $len = strlen($msg)+4;
+ $line = "+" . str_repeat("-", $len) . "+";
+
+ echo $line, "\n";
+ echo "| ", $msg, " |", "\n";
+ echo $line, "\n\n";
+}
function errors_are_bad($status) {
echo "\nEyh man. No worries. Happ shittens. Try again after fixing the errors
above.\n";
exit($status);
@@ -259,7 +267,7 @@
$srcdir_dependant_settings = array( 'INIPATH', 'LANGDIR' );
$overridden_settings = array();
-foreach ($_SERVER['argv'] as $opt) { // {{{
+foreach ($_SERVER['argv'] as $k => $opt) { // {{{
$parts = explode('=', $opt, 2);
if (strncmp($opt, '--enable-', 9) == 0) {
$o = substr($parts[0], 9);
@@ -332,6 +340,15 @@
break;
case 'partial':
+ if ($v == "yes") {
+ if (isset($_SERVER['argv'][$k+1])) {
+ $val = $_SERVER['argv'][$k+1];
+ errbox("TYPO ALERT: Didn't you mean --{$o}={$val}?");
+ } else {
+ errbox("TYPO ALERT: --partial without a chunk ID?");
+ }
+ }
+
$ac['PARTIAL'] = $v;
break;
@@ -576,4 +593,5 @@
errors_are_bad(1); // Tell the shell that this script finished with an error.
}
-?>
\ No newline at end of file
+?>
+