wrapper 517 B

12345678910111213141516171819202122232425262728293031
  1. #!/usr/bin/env bash
  2. unset rvm_default_flag
  3. source "$rvm_scripts_path/base"
  4. [[ -n "${MY_RUBY_HOME:-}" ]] || __rvm_become default
  5. [[ -n "${MY_RUBY_HOME:-}" ]] || {
  6. rvm_error "No ruby used, try 'rvm use ruby' or 'rvm ruby do rvm wrapper $*'"
  7. exit 3
  8. }
  9. case "${1:-}" in
  10. (show|regenerate)
  11. run_gem_wrappers "$@"
  12. ;;
  13. (help)
  14. shift
  15. rvm_help wrapper "$@"
  16. ;;
  17. (*)
  18. if
  19. [[ -x "$1" ]]
  20. then
  21. run_gem_wrappers "$@"
  22. else
  23. rvm_help wrapper "$@"
  24. exit 1
  25. fi
  26. ;;
  27. esac