Skip to content

Instantly share code, notes, and snippets.

@meskarune
Created August 22, 2012 15:22
Show Gist options
  • Save meskarune/3426732 to your computer and use it in GitHub Desktop.
Save meskarune/3426732 to your computer and use it in GitHub Desktop.
rsync local
desc "Deploy website via rsync"
task :rsync do
exclude = ""
if File.exists?('./rsync-exclude')
exclude = "--exclude-from '#{File.expand_path('./rsync-exclude')}'"
end
puts "## Deploying website via Rsync"
ok_failed system("rsync -av #{exclude} #{"--delete" unless rsync_delete == false} #{public_dir}/ #{document_root}")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment