Permalink
Browse files

combine build/runtime ruby rake tasks

  • Loading branch information...
1 parent 46398f7 commit 3782f19d3cf80ff893a93f8414198be50bc1e648 @hone hone committed Nov 7, 2011
Showing with 5 additions and 22 deletions.
  1. +5 −22 Rakefile
View
27 Rakefile
@@ -135,7 +135,6 @@ desc "install ruby"
task "ruby:install", :version do |t, args|
version = args[:version]
name = "ruby-#{version}"
- prefix = "/app/vendor/#{name}"
usr_dir = "usr"
Dir.mktmpdir("ruby-") do |tmpdir|
Dir.chdir(tmpdir) do |dir|
@@ -148,29 +147,13 @@ task "ruby:install", :version do |t, args|
sh "curl #{VENDOR_URL}/libffi-3.0.10.tgz -s -o - | tar vzxf -"
end
+ # runtime ruby
+ prefix = "/app/vendor/#{name}"
build_ruby_command(name, name, prefix, usr_dir, tmpdir)
- end
- end
-end
-
-desc "install ruby"
-task "ruby-build:install", :version do |t, args|
- version = args[:version]
- name = "ruby-#{version}"
- output = "ruby-build-#{version}"
- prefix = "/tmp/#{name}"
- usr_dir = "usr"
- 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 -"
- FileUtils.mkdir_p("#{name}/#{usr_dir}")
- Dir.chdir("#{name}/#{usr_dir}") do
- sh "curl #{VENDOR_URL}/libyaml-0.1.4.tgz -s -o - | tar vzxf -"
- sh "curl #{VENDOR_URL}/libffi-3.0.10.tgz -s -o - | tar vzxf -"
- end
+ # build ruby
+ output = "ruby-build-#{version}"
+ prefix = "/tmp/#{name}"
build_ruby_command(name, output, prefix, usr_dir, tmpdir)
end
end

0 comments on commit 3782f19

Please sign in to comment.