Skip to content

Commit

Permalink
Issue drush-ops#4: Add check to see if a module directory exists and …
Browse files Browse the repository at this point in the history
…do not overwrite it if it does.
  • Loading branch information
serundeputy committed Jan 3, 2016
1 parent 362c17b commit 93e1242
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion backdrop.drush.inc
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,11 @@ function drush_backdrop_updatedb_status() {
else {
$module_path = BACKDROP_ROOT . '/modules';
}

$module_install_location = $module_path . '/' . $project;
if (is_dir($module_install_location)) {
drush_print_r("Module is already installed ... exiting without re-writing module.");
continue;
}
exec(
"wget --directory-prefix $module_path https://github.com/backdrop-contrib/$project/releases/download/$latest[0]/$project.zip"
);
Expand Down

0 comments on commit 93e1242

Please sign in to comment.