summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-03-28 12:18:15 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-03-28 12:18:15 -0700
commitfd0e3ca1d596006fc4113349370445fc05faba75 (patch)
tree7f67588971060f6ce6763ca1ca59fc9c7ced138f /Rakefile
parentd99e78751ec6e3679343b4ac28f2ba9de427d505 (diff)
downloadpsych-fd0e3ca1d596006fc4113349370445fc05faba75.zip
adding tasks to help merge back and forth to ruby
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile17
1 files changed, 13 insertions, 4 deletions
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