pkg 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #!/usr/bin/env bash
  2. if (( ${rvm_trace_flag:=0} == 2 ))
  3. then
  4. set -x
  5. export rvm_trace_flag
  6. fi
  7. rvm_base_except="selector"
  8. source "$rvm_scripts_path/base"
  9. source "$rvm_scripts_path/functions/build"
  10. source "$rvm_scripts_path/functions/pkg"
  11. set +o errexit
  12. # Tools to make managing ruby dependencies inside of rvm easier.
  13. args=($*)
  14. action="${args[0]:-""}"
  15. library="${args[1]:-""}"
  16. args="$(echo ${args[@]:2})"
  17. rvm_warn "
  18. Beware, 'rvm pkg ...' is deprecated, read about the new autolibs feature: 'rvm help autolibs'.
  19. "
  20. if [[ -n "$library" ]]
  21. then
  22. case $library in
  23. readline|iconv|curl|openssl|zlib|autoconf|ncurses|pkgconfig|gettext|glib|mono|llvm|libxml2|libxslt|libyaml|epel)
  24. __rvm_setup_compile_environment ${library}
  25. install_${library}
  26. ;;
  27. ree_dependencies)
  28. for i in zlib ncurses readline openssl iconv
  29. do
  30. (
  31. __rvm_setup_compile_environment ${i}
  32. install_${i}
  33. )
  34. done
  35. ;;
  36. *)
  37. rvm_error "Package '${library}' is unknown."
  38. ;;
  39. esac
  40. exit $?
  41. elif [[ "$action" == remove ]]
  42. then
  43. rvm_log "Removing '$rvm_usr_path' ..."
  44. __rvm_rm_rf "$rvm_usr_path" &&
  45. rvm_log "Removed" ||
  46. rvm_error "Failed"
  47. else
  48. rvm_help pkg
  49. exit 1
  50. fi