Permalink
Browse files

tweak OS_Guess addition (include_once 'System.php' needs

processing)


git-svn-id: http://svn.php.net/repository/pear/pear-core/pear/pear-core/trunk@193365 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
1 parent 7fbec7b commit 687dbb93e96897758f056ae603fa91e57520e9e6 cellog committed Aug 14, 2005
Showing with 48 additions and 2 deletions.
  1. +33 −1 make-gopear-phar.php
  2. +15 −1 make-installpear-phar.php
View
@@ -27,6 +27,7 @@
$creator = new PHP_Archive_Creator('index.php', true);
foreach ($packages as $package) {
+ echo "adding PEAR/go-pear-tarballs/$package\n";
$creator->addFile("PEAR/go-pear-tarballs/$package", "PEAR/go-pear-tarballs/$package");
}
$commandcontents = file_get_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'go-pear-phar.php');
@@ -147,6 +148,23 @@
$creator->addString($commandcontents, 'PEAR/PackageFile/Generator/v1.php');
$commandcontents = file_get_contents($peardir . DIRECTORY_SEPARATOR . 'PEAR' .
+ DIRECTORY_SEPARATOR . 'PackageFile' . DIRECTORY_SEPARATOR . 'Generator' .
+ DIRECTORY_SEPARATOR . 'v2.php');
+$commandcontents = str_replace(
+ array(
+ "require_once '",
+ "include_once '",
+ "@PEAR-VER@",
+ ),
+ array(
+ "require_once 'phar://go-pear.phar/",
+ "include_once 'phar://go-pear.phar/",
+ $pearver,
+ ),
+ $commandcontents);
+$creator->addString($commandcontents, 'PEAR/PackageFile/Generator/v2.php');
+
+$commandcontents = file_get_contents($peardir . DIRECTORY_SEPARATOR . 'PEAR' .
DIRECTORY_SEPARATOR . 'Dependency2.php');
$commandcontents = str_replace(
array(
@@ -162,6 +180,20 @@
$commandcontents);
$creator->addString($commandcontents, 'PEAR/Dependency2.php');
+$commandcontents = file_get_contents($peardir . DIRECTORY_SEPARATOR . 'OS' .
+ DIRECTORY_SEPARATOR . 'Guess.php');
+$commandcontents = str_replace(
+ array(
+ "include_once \"",
+ "@package_version@",
+ ),
+ array(
+ "include_once \"phar://go-pear.phar/",
+ $pearver,
+ ),
+ $commandcontents);
+$creator->addString($commandcontents, 'OS/Guess.php');
+
$commandcontents = file_get_contents($peardir . DIRECTORY_SEPARATOR . 'PEAR' .
DIRECTORY_SEPARATOR . 'PackageFile.php');
$commandcontents = str_replace(
@@ -182,6 +214,7 @@
$creator->addDir($peardir, array('tests/',
'scripts/',
'go-pear-phar.php',
+ '*OS/Guess.php',
'*PEAR/Command.php',
'*PEAR/Dependency2.php',
'*PEAR/PackageFile/Generator/v1.php',
@@ -237,7 +270,6 @@
'*PEAR/Validate.php',
'*PEAR/XMLParser.php',
'PEAR.php',
- '*OS/Guess.php',
'*Archive/Tar.php',
'*Console/Getopt.php',
'System.php',
View
@@ -164,6 +164,20 @@
$commandcontents);
$creator->addString($commandcontents, 'PEAR/PackageFile/Generator/v2.php');
+$commandcontents = file_get_contents($peardir . DIRECTORY_SEPARATOR . 'OS' .
+ DIRECTORY_SEPARATOR . 'Guess.php');
+$commandcontents = str_replace(
+ array(
+ "include_once \"",
+ "@package_version@",
+ ),
+ array(
+ "include_once \"phar://go-pear.phar/",
+ $pearver,
+ ),
+ $commandcontents);
+$creator->addString($commandcontents, 'OS/Guess.php');
+
$commandcontents = file_get_contents($peardir . DIRECTORY_SEPARATOR . 'PEAR' .
DIRECTORY_SEPARATOR . 'Dependency2.php');
$commandcontents = str_replace(
@@ -200,6 +214,7 @@
$creator->addDir($peardir, array('tests/',
'scripts/',
'go-pear-phar.php',
+ '*OS/Guess.php',
'*PEAR/Command.php',
'*PEAR/Dependency2.php',
'*PEAR/PackageFile/Generator/v1.php',
@@ -255,7 +270,6 @@
'*PEAR/Validate.php',
'*PEAR/XMLParser.php',
'PEAR.php',
- '*OS/Guess.php',
'*Archive/Tar.php',
'*Console/Getopt.php',
'System.php',

0 comments on commit 687dbb9

Please sign in to comment.