unknown 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. #!/usr/bin/env bash
  2. requirements_unknown_binaries()
  3. {
  4. while
  5. (( $# ))
  6. do
  7. __rvm_which "$1" >/dev/null || missing_libs+=( "$1" )
  8. shift
  9. done
  10. }
  11. requirements_unknown_run()
  12. {
  13. case "$1" in
  14. (update-system)
  15. echo "Always update your system first!"
  16. ;;
  17. (rvm)
  18. requirements_unknown_binaries bash curl patch
  19. ;;
  20. (jruby*)
  21. requirements_unknown_binaries make java
  22. if
  23. is_head_or_disable_binary "$1"
  24. then
  25. requirements_unknown_binaries git
  26. case $( jruby_installation_method "$1" ) in
  27. ant) requirements_unknown_binaries ant ;;
  28. mvn) requirements_unknown_binaries mvn ;;
  29. esac
  30. fi
  31. ;;
  32. (ir*)
  33. requirements_unknown_binaries mono
  34. ;;
  35. (opal)
  36. requirements_unknown_binaries nodejs npm
  37. ;;
  38. (*-head)
  39. requirements_unknown_binaries openssl sqlite3 libtool autoconf automake bison pkg-config git
  40. missing_libs+=( build-essential libreadline zlib1g libyaml libc6 libgdbm ncurses )
  41. ;;
  42. (*)
  43. requirements_unknown_binaries openssl sqlite3 libtool autoconf automake bison pkg-config git
  44. missing_libs+=( build-essential libreadline zlib1g libyaml libc6 libgdbm ncurses )
  45. ;;
  46. esac
  47. }
  48. requirements_unknown_wait_key()
  49. {
  50. rvm_is_a_shell_function no_warning ||
  51. {
  52. rvm_error "
  53. RVM was not able to detect your system type and does not know how to load extra library paths for your system (if it's needed), read:
  54. rvm help autolibs
  55. for details how to disable this message.
  56. "
  57. return 1
  58. }
  59. rvm_log "press any key to continue"
  60. \typeset _read_char_flag anykey
  61. [[ -n "${ZSH_VERSION:-}" ]] && _read_char_flag=k || _read_char_flag=n
  62. builtin read -${_read_char_flag} 1 -s -r anykey
  63. }
  64. requirements_unknown_update_system()
  65. {
  66. echo "Always update your system first!"
  67. }
  68. requirements_unknown_define()
  69. {
  70. \typeset __reqirement
  71. \typeset -a missing_libs
  72. missing_libs=()
  73. for __reqirement
  74. do requirements_unknown_run "${__reqirement}"
  75. done
  76. echo "Install: ${missing_libs[*]}"
  77. requirements_unknown_wait_key || return $?
  78. }