mirror of
https://github.com/php/php-src.git
synced 2024-11-24 02:15:04 +08:00
* support platform-specific files
This commit is contained in:
parent
d7ef0b964b
commit
6eee62645b
@ -139,6 +139,19 @@ class PEAR_Installer extends PEAR_Common
|
||||
|
||||
function _installFile($file, $atts, $tmp_path)
|
||||
{
|
||||
static $os;
|
||||
if (isset($atts['platform'])) {
|
||||
if (empty($os)) {
|
||||
include_once "OS/Guess.php";
|
||||
$os = new OS_Guess();
|
||||
}
|
||||
// return if this file is meant for another platform
|
||||
if (!$os->matchSignature($atts['platform'])) {
|
||||
$this->log(1, "skipped $file (meant for $atts[platform], we are ".$os->getSignature().")");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
switch ($atts['role']) {
|
||||
case 'test': case 'data': case 'ext':
|
||||
// don't install test files for now
|
||||
|
Loading…
Reference in New Issue
Block a user