rubygems 568 B

123456789101112131415161718192021222324252627282930
  1. #!/usr/bin/env bash
  2. source "$rvm_scripts_path/base"
  3. source "$rvm_scripts_path/functions/rubygems"
  4. result=0
  5. __rvm_become
  6. builtin command -v ruby > /dev/null || {
  7. rvm_error "'ruby' was not found, cannot install rubygems unless ruby is present (Do you have an RVM ruby installed & selected?)"
  8. exit 1
  9. }
  10. version="$1"
  11. shift
  12. [[ -n "$version" ]] || {
  13. rvm_error "Usage: rvm rubygems [x.y.z|latest-x.y|latest|remove]"
  14. exit 1
  15. }
  16. case "$version" in
  17. remove|validate|validate_gemfile)
  18. rubygems_$version "$@"
  19. ;;
  20. *)
  21. rubygems_setup ${version}
  22. ;;
  23. esac