truffleruby 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/usr/bin/env bash
  2. truffleruby_post_install_hook()
  3. {
  4. # Run the TruffleRuby post-install hook
  5. __rvm_log_command "cext" "${rvm_ruby_string} - #compiling c-extensions" \
  6. "$1/lib/truffle/post_install_hook.sh"
  7. }
  8. truffleruby_install()
  9. {
  10. __rvm_setup_compile_environment "${rvm_ruby_string}" || return $?
  11. __rvm_cd "${rvm_src_path}"
  12. __rvm_fetch_ruby || return $?
  13. __rvm_cd "${rvm_src_path}/${rvm_ruby_string}"
  14. __rvm_apply_patches
  15. __rvm_rm_rf "${rvm_ruby_home}" && \command \mkdir -p "$(dirname "${rvm_ruby_home}")" &&
  16. __rvm_log_command "install" "${rvm_ruby_string} - #installing to ${rvm_ruby_home}" \
  17. __rvm_cp -Rf "${rvm_src_path}/${rvm_ruby_string}" "${rvm_ruby_home}" || return $?
  18. __rvm_cd "${rvm_ruby_home}"
  19. truffleruby_post_install_hook "${rvm_ruby_home}"
  20. # Avoid updating RubyGems for now as it seems fragile
  21. rvm_rubygems_version="ignore"
  22. __rvm_initial_gemsets_create "$rvm_ruby_home/bin/ruby"
  23. __rvm_post_install
  24. __rvm_fetch_ruby_cleanup
  25. rvm_log "RVM gem rubygems-bundler is not installed by default for TruffleRuby."
  26. rvm_log "Use 'bundle exec' instead when needed. See rvm/rvm#4765."
  27. }