function _drush_is_drush_shebang_line

8.0.x drush.inc _drush_is_drush_shebang_line($line)
6.x drush.inc _drush_is_drush_shebang_line($line)
7.x drush.inc _drush_is_drush_shebang_line($line)
4.x drush.inc _drush_is_drush_shebang_line($line)
5.x drush.inc _drush_is_drush_shebang_line($line)
master drush.inc _drush_is_drush_shebang_line($line)

Check to see if the provided line is a "#!/usr/bin/env drush" "shebang" script line.

2 calls to _drush_is_drush_shebang_line()
_drush_core_eval_shebang_script in commands/core/core.drush.inc
Evaluate a script that begins with #!drush php-script
_drush_is_drush_shebang_script in includes/drush.inc
Check to see if the provided script file is a "#!/usr/bin/env drush" "shebang" script line.

File

includes/drush.inc, line 355
The drush API implementation and helpers.

Code

function _drush_is_drush_shebang_line($line) {
  return ((substr($line, 0, 2) == '#!') && (strstr($line, 'drush') !== FALSE));
}