Skip to content

Commit

Permalink
tweak OS_Guess addition (include_once 'System.php' needs
Browse files Browse the repository at this point in the history
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
cellog committed Aug 14, 2005
1 parent 7fbec7b commit 687dbb9
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 2 deletions.
34 changes: 33 additions & 1 deletion make-gopear-phar.php
Expand Up @@ -27,6 +27,7 @@


$creator = new PHP_Archive_Creator('index.php', true); $creator = new PHP_Archive_Creator('index.php', true);
foreach ($packages as $package) { foreach ($packages as $package) {
echo "adding PEAR/go-pear-tarballs/$package\n";
$creator->addFile("PEAR/go-pear-tarballs/$package", "PEAR/go-pear-tarballs/$package"); $creator->addFile("PEAR/go-pear-tarballs/$package", "PEAR/go-pear-tarballs/$package");
} }
$commandcontents = file_get_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'go-pear-phar.php'); $commandcontents = file_get_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'go-pear-phar.php');
Expand Down Expand Up @@ -146,6 +147,23 @@
$commandcontents); $commandcontents);
$creator->addString($commandcontents, 'PEAR/PackageFile/Generator/v1.php'); $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' . $commandcontents = file_get_contents($peardir . DIRECTORY_SEPARATOR . 'PEAR' .
DIRECTORY_SEPARATOR . 'Dependency2.php'); DIRECTORY_SEPARATOR . 'Dependency2.php');
$commandcontents = str_replace( $commandcontents = str_replace(
Expand All @@ -162,6 +180,20 @@
$commandcontents); $commandcontents);
$creator->addString($commandcontents, 'PEAR/Dependency2.php'); $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' . $commandcontents = file_get_contents($peardir . DIRECTORY_SEPARATOR . 'PEAR' .
DIRECTORY_SEPARATOR . 'PackageFile.php'); DIRECTORY_SEPARATOR . 'PackageFile.php');
$commandcontents = str_replace( $commandcontents = str_replace(
Expand All @@ -182,6 +214,7 @@
$creator->addDir($peardir, array('tests/', $creator->addDir($peardir, array('tests/',
'scripts/', 'scripts/',
'go-pear-phar.php', 'go-pear-phar.php',
'*OS/Guess.php',
'*PEAR/Command.php', '*PEAR/Command.php',
'*PEAR/Dependency2.php', '*PEAR/Dependency2.php',
'*PEAR/PackageFile/Generator/v1.php', '*PEAR/PackageFile/Generator/v1.php',
Expand Down Expand Up @@ -237,7 +270,6 @@
'*PEAR/Validate.php', '*PEAR/Validate.php',
'*PEAR/XMLParser.php', '*PEAR/XMLParser.php',
'PEAR.php', 'PEAR.php',
'*OS/Guess.php',
'*Archive/Tar.php', '*Archive/Tar.php',
'*Console/Getopt.php', '*Console/Getopt.php',
'System.php', 'System.php',
Expand Down
16 changes: 15 additions & 1 deletion make-installpear-phar.php
Expand Up @@ -164,6 +164,20 @@
$commandcontents); $commandcontents);
$creator->addString($commandcontents, 'PEAR/PackageFile/Generator/v2.php'); $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' . $commandcontents = file_get_contents($peardir . DIRECTORY_SEPARATOR . 'PEAR' .
DIRECTORY_SEPARATOR . 'Dependency2.php'); DIRECTORY_SEPARATOR . 'Dependency2.php');
$commandcontents = str_replace( $commandcontents = str_replace(
Expand Down Expand Up @@ -200,6 +214,7 @@
$creator->addDir($peardir, array('tests/', $creator->addDir($peardir, array('tests/',
'scripts/', 'scripts/',
'go-pear-phar.php', 'go-pear-phar.php',
'*OS/Guess.php',
'*PEAR/Command.php', '*PEAR/Command.php',
'*PEAR/Dependency2.php', '*PEAR/Dependency2.php',
'*PEAR/PackageFile/Generator/v1.php', '*PEAR/PackageFile/Generator/v1.php',
Expand Down Expand Up @@ -255,7 +270,6 @@
'*PEAR/Validate.php', '*PEAR/Validate.php',
'*PEAR/XMLParser.php', '*PEAR/XMLParser.php',
'PEAR.php', 'PEAR.php',
'*OS/Guess.php',
'*Archive/Tar.php', '*Archive/Tar.php',
'*Console/Getopt.php', '*Console/Getopt.php',
'System.php', 'System.php',
Expand Down

0 comments on commit 687dbb9

Please sign in to comment.