Modified: MacRuby/branches/experimental/rakelib/upstream_git_repo_tasks.rb (1521 => 1522)
--- MacRuby/branches/experimental/rakelib/upstream_git_repo_tasks.rb 2009-05-03 13:02:58 UTC (rev 1521)
+++ MacRuby/branches/experimental/rakelib/upstream_git_repo_tasks.rb 2009-05-03 13:26:27 UTC (rev 1522)
@@ -110,6 +110,19 @@
end
end
+ namespace :patches do
+ desc "Applies all patches in #{@local_dir}/upstream_patches"
+ task :apply do
+ Dir.chdir(@local_dir) do
+ patches = Dir.glob("upstream_patches/*.patch")
+ patches.sort_by { |name| File.basename(name)[0,4] }.each do |patch|
+ puts "\nApplying patch: #{File.basename(patch)}"
+ sh "/usr/bin/patch -p1 < #{patch}"
+ end
+ end
+ end
+ end
+
desc "Remove the `#{@upstream_options[:branch]}' branch and switch to the `master' branch (cleans all untracked files!)"
task :remove do
puts "\nRemoving the `#{@upstream_options[:branch]}' branch and all untracked files!"