function _drush_test_os

8.0.x environment.inc _drush_test_os($os, $os_list_to_check)
6.x environment.inc _drush_test_os($os, $os_list_to_check)
7.x environment.inc _drush_test_os($os, $os_list_to_check)
5.x environment.inc _drush_test_os($os, $os_list_to_check)
master environment.inc _drush_test_os($os, $os_list_to_check)
4 calls to _drush_test_os()
drush_is_cygwin in includes/environment.inc
Check if the operating system is Winodws running some variant of cygwin -- either Cygwin or the MSYSGIT shell. If you care which is which, test mingw first.
drush_is_mingw in includes/environment.inc
drush_is_osx in includes/environment.inc
Check if the operating system is OS X. This will return TRUE for Mac OS X (Darwin).
_drush_get_os in includes/environment.inc
Return the OS we are running under.

File

includes/environment.inc, line 595
Functions used by drush to query the environment and setting the current configuration.

Code

function _drush_test_os($os, $os_list_to_check) {
  $os = _drush_get_os($os);
  foreach ($os_list_to_check as $test) {
    if (strtoupper(substr($os, 0, strlen($test))) == strtoupper($test)) {
      return TRUE;
    }
  }
  return FALSE;
}