cvs: peardoc / make-partial.php

From: Date: Tue, 13 Sep 2005 22:35:20 +0000
Subject: cvs: peardoc / make-partial.php
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-6808@lists.php.net to get a copy of this message
techtonik Tue Sep 13 18:35:20 2005 EDT Modified files: /peardoc make-partial.php Log: + PHP_Compat with PHP4 + --include section1 section2 ... - fix rename warning under PHP4/win http://cvs.php.net/diff.php/peardoc/make-partial.php?r1=1.5&r2=1.6&ty=u Index: peardoc/make-partial.php diff -u peardoc/make-partial.php:1.5 peardoc/make-partial.php:1.6 --- peardoc/make-partial.php:1.5 Tue Sep 13 14:24:22 2005 +++ peardoc/make-partial.php Tue Sep 13 18:35:17 2005 @@ -12,9 +12,14 @@ * * @author Martin Jansen <mj@php.net> * @copyright 2005 The PEAR Group - * @version CVS: $Id: make-partial.php,v 1.5 2005/09/13 18:24:22 techtonik Exp $ + * @version CVS: $Id: make-partial.php,v 1.6 2005/09/13 22:35:17 techtonik Exp $ */ +if (substr(PHP_VERSION, 0, 1) == "4") { + require_once "PHP/Compat.php"; + $components = PHP_Compat::loadVersion('5.0.0'); +} + require_once "Console/Getopt.php"; $console = new Console_Getopt; $args = $console->getopt($console->readPHPArgv(), array(), @@ -25,6 +30,7 @@ $format = "html"; $sections = array(); +$incflag = false; foreach ($args[0] as $arg) { if ($arg[0] == "--help") { showHelp(); @@ -33,6 +39,14 @@ $format = $arg[1]; } elseif ($arg[0] == '--include') { $sections[] = $arg[1]; + $incflag = true; + } +} + +if ($incflag) { + // collect other space delimited names as section names + foreach ($args[1] as $arg) { + $sections[] = $arg; } } @@ -159,6 +173,7 @@ return; } + unlink("manual.xml.in"); rename("manual.xml.in.partial-backup", "manual.xml.in"); }

« previous php.pear.doc (#6808) next »