function drush_devel_download
Same name in other branches
- 7.x-1.x devel.drush.inc \drush_devel_download()
A command callback.
File
-
./
devel.drush.inc, line 78
Code
function drush_devel_download() {
$args = func_get_args();
if (isset($args[0])) {
$path = $args[0];
}
else {
$path = drush_get_context('DRUSH_DRUPAL_ROOT');
if (module_exists('libraries')) {
$path .= '/' . libraries_get_path('FirePHPCore') . '/FirePHPCore';
}
else {
$path .= '/' . drupal_get_path('module', 'devel') . '/FirePHPCore';
}
}
if (is_dir($path)) {
drush_log('FirePHP already present. No download required.', 'ok');
}
elseif (drush_shell_exec('svn export http://firephp.googlecode.com/svn/branches/Library-FirePHPCore-0.3 ' . $path)) {
drush_log(dt('FirePHP has been exported via svn to @path.', array(
'@path' => $path,
)), 'success');
}
else {
drush_log(dt('Drush was unable to export FirePHP to @path.', array(
'@path' => $path,
)), 'error');
}
}