#!/usr/bin/env php
<?php 
/**
 * @file
 * drush is a PHP script implementing a command line shell for Drupal.
 *
 * @requires PHP CLI 5.2.0, or newer.
 */
require dirname(__FILE__) . '/includes/bootstrap.inc';
drush_bootstrap_prepare();
exit(drush_main());
/**
 * The main Drush function.
 *
 * - Runs "early" option code, if set (see global options).
 * - Parses the command line arguments, configuration files and environment.
 * - Prepares and executes a Drupal bootstrap, if possible,
 * - Dispatches the given command.
 *
 * function_exists('drush_main') may be used by modules to detect whether
 * they are being called from drush.  See http://drupal.org/node/1181308
 * and http://drupal.org/node/827478
 *
 * @return
 *   Whatever the given command returns.
 */
function drush_main()
{
    $return = '';
    if ($file = drush_get_option('early', FALSE)) {
        require_once $file;
예제 #2
0
#!/usr/bin/env php
<?php 
/**
 * @file
 * drush is a PHP script implementing a command line shell for Drupal.
 *
 * @requires PHP CLI 5.3.0, or newer.
 */
require dirname(__FILE__) . '/includes/bootstrap.inc';
if (drush_bootstrap_prepare() === FALSE) {
    exit(1);
}
exit(drush_main());
/**
 * The main Drush function.
 *
 * - Runs "early" option code, if set (see global options).
 * - Parses the command line arguments, configuration files and environment.
 * - Prepares and executes a Drupal bootstrap, if possible,
 * - Dispatches the given command.
 *
 * function_exists('drush_main') may be used by modules to detect whether
 * they are being called from drush.  See http://drupal.org/node/1181308
 * and http://drupal.org/node/827478
 *
 * @return
 *   Whatever the given command returns.
 */
function drush_main()
{
    $return = '';
예제 #3
0
 /**
  * Minimally bootstrap drush
  *
  * This is equivalent to the level DRUSH_BOOTSTRAP_NONE, as we
  * haven't run drush_bootstrap() yet. To do anything, you'll need to
  * bootstrap to some level using drush_bootstrap().
  *
  * @see drush_bootstrap()
  */
 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     require_once dirname(__FILE__) . '/../includes/bootstrap.inc';
     drush_bootstrap_prepare();
 }