From fd0e3ca1d596006fc4113349370445fc05faba75 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Sun, 28 Mar 2010 12:18:15 -0700 Subject: adding tasks to help merge back and forth to ruby --- Rakefile | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile index 35888b5..36095e1 100644 --- a/Rakefile +++ b/Rakefile @@ -31,17 +31,26 @@ Hoe.add_include_dirs('.') task :test => :compile desc "merge psych in to ruby trunk" -task :merge do +namespace :merge do basedir = File.expand_path File.dirname __FILE__ rubydir = File.join ENV['HOME'], 'git', 'ruby' - { + mergedirs = { # From # To [basedir, 'ext', 'psych/'] => [rubydir, 'ext', 'psych/'], [basedir, 'lib', 'psych/'] => [rubydir, 'lib', 'psych/'], [basedir, 'test', 'psych/'] => [rubydir, 'test', 'psych/'], [basedir, 'lib', 'psych.rb'] => [rubydir, 'lib', 'psych.rb'], - }.each do |from, to| - sh "rsync -av --delete #{File.join(*from)} #{File.join(*to)}" + } + task :to_ruby do + mergedirs.each do |from, to| + sh "rsync -av --delete #{File.join(*from)} #{File.join(*to)}" + end + end + + task :from_ruby do + mergedirs.each do |from, to| + sh "rsync -av --delete #{File.join(*to)} #{File.join(*from)}" + end end end -- cgit v1.2.3