Skip to content

Commit

Permalink
rsync +git should now correctly use the ssh config
Browse files Browse the repository at this point in the history
* previously it assumed you use usbmuxd - d'oh
  • Loading branch information
dmayer-mtso committed Jan 30, 2014
1 parent 0ab527a commit 1ac6aaa
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/rsync_git_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,16 @@ def sync_new_revision
rescue
$log.error "Reset of repo failed. If this is the first time you run rsync+git for this app this may be okay."
end
cmd = "rsync -avz -e 'ssh -oStrictHostKeyChecking=no -p #{$device.tool_port}' root@localhost:#{Shellwords.escape(@remote_path)}/ #{Shellwords.escape(@local_path)}/"



if $settings['device_connection_mode'] == "ssh"
cmd = "rsync -avz -e 'ssh -oStrictHostKeyChecking=no -p #{$settings.ssh_port}' #{$settings.ssh_username}@#{$settings.ssh_host}:#{Shellwords.escape(@remote_path)}/ #{Shellwords.escape(@local_path)}/"
else
cmd = "rsync -avz -e 'ssh -oStrictHostKeyChecking=no -p #{$device.tool_port}' root@localhost:#{Shellwords.escape(@remote_path)}/ #{Shellwords.escape(@local_path)}/"
end


$log.info "Executing rsync command #{cmd}"
begin
PTY.spawn(cmd) { |rsync_out, rsync_in, pid |
Expand Down

0 comments on commit 1ac6aaa

Please sign in to comment.