Permalink
Browse files

rake task to build ruby 1.9.3

  • Loading branch information...
1 parent c7642bb commit 28a874ca53abc54652756cdfb6763b062cb61459 @hone hone committed Nov 2, 2011
Showing with 16 additions and 0 deletions.
  1. +16 −0 Rakefile
View
16 Rakefile
@@ -96,3 +96,19 @@ task "node:install", :version do |t, args|
end
end
end
+
+desc "install ruby"
+task "ruby:install", :version do |t, args|
+ version = args[:version]
+ name = "ruby-#{version}"
+ prefix = "/app/vendor/#{name}"
+ Dir.mktmpdir("ruby-") do |tmpdir|
+ Dir.chdir(tmpdir) do |dir|
+ FileUtils.rm_rf("#{tmpdir}/*")
+
+ sh "curl http://ftp.ruby-lang.org/pub/ruby/1.9/#{name}.tar.gz -s -o - | tar vzxf -"
+ sh "vulcan build -v -o #{name}.tgz --source #{name} --command=\"./configure --prefix #{prefix} && make && make install\""
+ s3_upload(tmpdir, name)
+ end
+ end
+end

0 comments on commit 28a874c

Please sign in to comment.