function drushScriptCase::create_site_local_drush

8.0.x drushScriptTest.php drushScriptCase::create_site_local_drush($drush_base)
master drushScriptTest.php drushScriptCase::create_site_local_drush($drush_base)

Copy UNISH_DRUSH into the specified site-local location.

1 call to drushScriptCase::create_site_local_drush()

File

tests/drushScriptTest.php, line 93

Namespace

Unish

Class

drushScriptCase
Tests for the 'drush' script itself

Code

function create_site_local_drush($drush_base) {
  $drush_root = $this->webroot() . '/' . $drush_base . '/drush/drush';
  $bin_dir = $this->webroot() . '/' . $drush_base . '/bin';

  $this->mkdir(dirname($drush_root));
  $this->recursive_copy(dirname(UNISH_DRUSH), $drush_root);
  @chmod($drush_root . '/drush', 0777);
  @chmod($drush_root . '/drush.launcher', 0777);
  $this->mkdir($bin_dir);
  symlink($drush_root . '/drush', $bin_dir . '/drush');

  return $drush_root;
}