osx-support 612 B

1234567891011121314151617
  1. #!/usr/bin/env bash
  2. requiremnts_osx_java_fail()
  3. {
  4. __rvm_which java >/dev/null 2>&1 || return $?
  5. java_version=$(java -version 2>&1 | __rvm_awk -F'"' '/ version /{print $2}')
  6. case "$java_version" in
  7. (1.5.*)
  8. printf "%b" "\n\nWARNING: A very outdated JAVA version is being used ($java_version), it is strongly recommended that you upgrade to the latest version.\n\n"
  9. ;;
  10. (1.3.*|1.4.*)
  11. printf "%b" "\n\nERROR: Unsupported JAVA version $java_version. In order to install and use JRuby you must upgrade to the latest JAVA version.\n\n"
  12. return 1
  13. ;;
  14. esac
  15. true # for OSX
  16. }