Skip to content

Commit

Permalink
rake task to build ruby 1.9.3
Browse files Browse the repository at this point in the history
  • Loading branch information
hone committed Nov 8, 2011
1 parent c7642bb commit 28a874c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Rakefile
Expand Up @@ -96,3 +96,19 @@ task "node:install", :version do |t, args|
end end
end 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.