smartos 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #!/usr/bin/env bash
  2. requirements_smartos_lib_installed()
  3. {
  4. pkgin list | __rvm_grep "^$1-[0-9]" >/dev/null 2>&1|| return $?
  5. }
  6. requirements_smartos_lib_available()
  7. {
  8. pkgin avail | __rvm_grep "^$1-[0-9]" >/dev/null 2>&1|| return $?
  9. }
  10. requirements_smartos_libs_install()
  11. {
  12. __rvm_try_sudo pkgin -y install "$@" || return $?
  13. }
  14. requirements_smartos_update_system()
  15. {
  16. __rvm_try_sudo pkgin -y full-upgrade || return $?
  17. }
  18. requirements_smartos_define()
  19. {
  20. case "$1" in
  21. (rvm)
  22. requirements_check bash curl patch git
  23. ;;
  24. (jruby*)
  25. requirements_check make openjdk7
  26. if
  27. is_head_or_disable_binary "$1"
  28. then
  29. requirements_check git
  30. case $( jruby_installation_method "$1" ) in
  31. ant) requirements_check apache-ant ;;
  32. mvn) requirements_check apache-maven ;;
  33. esac
  34. fi
  35. ;;
  36. (ir*)
  37. requirements_check mono
  38. ;;
  39. (opal)
  40. requirements_check nodejs
  41. ;;
  42. (*-head)
  43. requirements_check coreutils gcc47 gmake readline sqlite3 ncurses libyaml autoconf automake libtool libxslt
  44. __rvm_update_configure_opt_dir "$1" "/opt/local"
  45. ;;
  46. (*)
  47. requirements_check coreutils gcc47 gmake readline sqlite3 ncurses libyaml autoconf automake libtool libxslt
  48. __rvm_update_configure_opt_dir "$1" "/opt/local"
  49. ;;
  50. esac
  51. }