Created
August 22, 2012 15:22
-
-
Save meskarune/3426732 to your computer and use it in GitHub Desktop.
rsync local
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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