Permalink
Browse files

adding tasks to help merge back and forth to ruby

  • Loading branch information...
1 parent d99e787 commit fd0e3ca1d596006fc4113349370445fc05faba75 @tenderlove tenderlove committed Mar 28, 2010
Showing with 13 additions and 4 deletions.
  1. +13 −4 Rakefile
View
@@ -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

0 comments on commit fd0e3ca

Please sign in to comment.