function drush_backend_generate_sitealias

8.0.x backend.inc drush_backend_generate_sitealias($backend_options)
6.x backend.inc drush_backend_generate_sitealias($backend_options)
7.x backend.inc drush_backend_generate_sitealias($backend_options)
5.x backend.inc drush_backend_generate_sitealias($backend_options)
master backend.inc drush_backend_generate_sitealias($backend_options)

Helper function that generates an anonymous site alias specification for the given parameters.

File

includes/backend.inc, line 1062
Drush backend API

Code

function drush_backend_generate_sitealias($backend_options) {
  // Ensure default values.
  $backend_options += array(
    'remote-host' => NULL,
    'remote-user' => NULL,
    'ssh-options' => NULL,
    'drush-script' => NULL,
    'env-vars' => NULL,
  );
  return array(
    'remote-host' => $backend_options['remote-host'],
    'remote-user' => $backend_options['remote-user'],
    'ssh-options' => $backend_options['ssh-options'],
    '#env-vars' => $backend_options['env-vars'],
    'path-aliases' => array(
      '%drush-script' => $backend_options['drush-script'],
    ),
  );
}