[macruby-changes] [1522] MacRuby/branches/experimental/rakelib/upstream_git_repo_tasks.rb

source_changes at macosforge.org source_changes at macosforge.org
Sun May 3 06:26:28 PDT 2009


Revision: 1522
          http://trac.macosforge.org/projects/ruby/changeset/1522
Author:   eloy.de.enige at gmail.com
Date:     2009-05-03 06:26:27 -0700 (Sun, 03 May 2009)
Log Message:
-----------
Added a rake task to apply all upstream patches

Modified Paths:
--------------
    MacRuby/branches/experimental/rakelib/upstream_git_repo_tasks.rb

Modified: MacRuby/branches/experimental/rakelib/upstream_git_repo_tasks.rb
===================================================================
--- 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!"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090503/1fcfde7f/attachment.html>


More information about the macruby-changes mailing list