* support platform-specific files

This commit is contained in:
Stig Bakken 2002-05-19 06:19:26 +00:00
parent d7ef0b964b
commit 6eee62645b

View File

@ -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