Skip to content
This repository has been archived by the owner on Sep 25, 2023. It is now read-only.

Commit

Permalink
Merge pull request #18 from mordonez/master
Browse files Browse the repository at this point in the history
Fixing downsync command
  • Loading branch information
sirkitree committed Apr 24, 2013
2 parents fad8e6a + 0d0ef5e commit f7dc0e3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions drush/aliases/example.aliases.drushrc.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@
'uri' => 'stage.example.com',
'root' => '/var/www/stage.example.com/docroot',
'remote-host' => 'example.com',
'remote-user' => 'user',
);

$aliases['live'] = array(
'uri' => 'example.com',
'root' => '/var/www/stage.example.com/docroot',
'remote-host' => 'example.com',
'remote-user' => 'user',
);
8 changes: 4 additions & 4 deletions drush/commands/downsync.drush.inc
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,20 @@ function drush_downsync($source = NULL, $destination = NULL) {
// Make sure we have the source-dump and target-dump options.
$source_dump = drush_get_option('source-dump');
if (!isset($source_dump)) {
drush_set_option('source-dump', '/tmp/dump.sql');
drush_set_option('source-dump', '/tmp/source-dump.sql');
}

$target_dump = drush_get_option('target-dump');
if (!isset($target_dump)) {
drush_set_option('target-dump', '/tmp/dump.sql');
drush_set_option('target-dump', '/tmp/target-dump.sql');
}

// Execute a drush sql-sync
print dt('SQL Sync running... NOTE: if you do not have ssh passwordless logins setup, you may be asked for your password multiple times.');

drush_invoke('sql-sync', $source, $destination);
drush_invoke('sql-sync', array($source, $destination));

// Rsync the files.
print dt('Rsync-ing files...');
drush_invoke('rsync', $source .':%files', $destination .':%files');
drush_invoke('rsync', array($source . ':%files', $destination . ':%files'));
}

0 comments on commit f7dc0e3

Please sign in to comment.