diff options
Diffstat (limited to 'buildscripts/phing/classes/phing/tasks/system/condition/OsCondition.php')
-rwxr-xr-x[-rw-r--r--] | buildscripts/phing/classes/phing/tasks/system/condition/OsCondition.php | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/buildscripts/phing/classes/phing/tasks/system/condition/OsCondition.php b/buildscripts/phing/classes/phing/tasks/system/condition/OsCondition.php index d80729e7..50a7174f 100644..100755 --- a/buildscripts/phing/classes/phing/tasks/system/condition/OsCondition.php +++ b/buildscripts/phing/classes/phing/tasks/system/condition/OsCondition.php @@ -1,6 +1,6 @@ <?php /* - * $Id: OsCondition.php 59 2006-04-28 14:49:47Z mrook $ + * $Id: d63246e2d25230f5ba6e45a651497e3ba01abe2c $ * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT @@ -25,8 +25,8 @@ require_once 'phing/tasks/system/condition/ConditionBase.php'; * Condition that tests the OS type. * * @author Andreas Aderhold <andi@binarycloud.com> - * @copyright © 2001,2002 THYRELL. All rights reserved - * @version $Revision: 1.8 $ $Date: 2006-04-28 10:49:47 -0400 (Fri, 28 Apr 2006) $ + * @copyright 2001,2002 THYRELL. All rights reserved + * @version $Id$ * @access public * @package phing.tasks.system.condition */ @@ -40,20 +40,20 @@ class OsCondition implements Condition { function evaluate() { $osName = strtolower(Phing::getProperty("os.name")); - + if ($this->family !== null) { if ($this->family === "windows") { return StringHelper::startsWith("win", $osName); } elseif ($this->family === "mac") { return (strpos($osName, "mac") !== false || strpos($osName, "darwin") !== false); } elseif ($this->family === ("unix")) { - return ( - StringHelper::endsWith("ix", $osName) || - StringHelper::endsWith("ux", $osName) || - StringHelper::endsWith("bsd", $osName) || - StringHelper::startsWith("sunos", $osName) || - StringHelper::startsWith("darwin", $osName) - ); + return ( + StringHelper::endsWith("ix", $osName) || + StringHelper::endsWith("ux", $osName) || + StringHelper::endsWith("bsd", $osName) || + StringHelper::startsWith("sunos", $osName) || + StringHelper::startsWith("darwin", $osName) + ); } throw new BuildException("Don't know how to detect os family '" . $this->family . "'"); } |