function make_build_path

8.0.x make.drush.inc make_build_path($build_path)
6.x make.drush.inc make_build_path($build_path)
7.x make.drush.inc make_build_path($build_path)
5.x make.drush.inc make_build_path($build_path)
master make.drush.inc make_build_path($build_path)

The path where the final build will be placed.

2 calls to make_build_path()
drush_make in commands/make/make.drush.inc
Drush callback; make based on the makefile.
drush_make_post_make in commands/make/make.drush.inc
Implements drush_hook_post_COMMAND() for the make command.

File

commands/make/make.drush.inc, line 475
Drush Make commands.

Code

function make_build_path($build_path) {
  static $saved_path;
  if (isset($saved_path)) {
    return $saved_path;
  }

  // Determine the base of the build.
  if (drush_get_option('tar')) {
    $build_path = dirname($build_path) . '/' . basename($build_path, '.tar.gz') . '.tar.gz';
  }
  elseif (isset($build_path) && (!empty($build_path) || $build_path == '.')) {
    $build_path = rtrim($build_path, '/');
  }
  // Allow tests to run without a specified base path.
  elseif (drush_get_option('test') || drush_confirm(dt("Make new site in the current directory?"))) {
    $build_path = '.';
  }
  else {
    return drush_user_abort(dt('Build aborted.'));
  }
  if ($build_path != '.' && file_exists($build_path)) {
    return drush_set_error('MAKE_PATH_EXISTS', dt('Base path %path already exists', array('%path' => $build_path)));
  }
  $saved_path = $build_path;
  return $build_path;
}