Commit 88968339 authored by Erik Michaels-Ober's avatar Erik Michaels-Ober
Browse files

Merge pull request #507 from chrisseaton/jruby-9000-dev-check-java

Require Java 7 for jruby-9000-dev.
parents c78eb9db 484782aa
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -576,6 +576,23 @@ fix_rbx_irb() {
    true
}

require_java7() {
  local version=`java -version 2>&1`
  if [ $? -eq 0 ]
  then
    if [[ $version == *1.[78]* ]]
    then
      return 0
    else
      echo "jruby-9000-dev requires Java 7 - please install a 1.7 compatible JRE, or ensure it is on your path"
      return 1
    fi
  else
    echo "Couldn't execute Java - please install a 1.7 compatible JRE, or ensure it is on your path"
    return 1
  fi
}

require_gcc() {
  local gcc="$(locate_gcc || true)"

+1 −0
Original line number Diff line number Diff line
require_java7
install_package "jruby-9000.dev" "http://ci.jruby.org/snapshots/master/jruby-dist-9000.dev-bin.tar.gz" jruby