From: Stig Bakken Date: Sun, 19 May 2002 06:19:26 +0000 (+0000) Subject: * support platform-specific files X-Git-Tag: php-4.3.0dev-ZendEngine2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6eee62645b26da3b6cd6f466250a065ae13c5331;p=php * support platform-specific files --- diff --git a/pear/PEAR/Installer.php b/pear/PEAR/Installer.php index 0bbea5365a..4341ea1864 100644 --- a/pear/PEAR/Installer.php +++ b/pear/PEAR/Installer.php @@ -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