source: core/c/find-java-home @ e574b5e

Last change on this file since e574b5e was e574b5e, checked in by kytv <kytv@…>, 8 years ago

minor updates to jbigi/jcpuid scripts

  • use my find-java-home stub script when building jcupid
  • move find-java-home to core/c
  • add support for ArchLinux? to find-java-home
  • Property mode set to 100644
File size: 1.0 KB
Line 
1UNIXTYPE=$(uname -s | tr "[A-Z]" "[a-z]")
2if [ $UNIXTYPE = "freebsd" ]; then
3    if [ -d /usr/local/openjdk6 ]; then
4        JAVA_HOME="/usr/local/openjdk6"
5    elif [ -d /usr/local/openjdk7 ]; then
6        JAVA_HOME="/usr/local/openjdk7"
7    fi
8elif [ $UNIXTYPE = "openbsd" ]; then
9    if [ -d /usr/local/jdk-1.7.0 ]; then
10        JAVA_HOME="/usr/local/jdk-1.7.0"
11    fi
12elif [ $UNIXTYPE = "netbsd" ]; then
13    if [ -d /usr/pkg/java/openjdk7 ]; then
14        JAVA_HOME="/usr/pkg/java/openjdk7"
15    fi
16elif [ $UNIXTYPE = "linux" ] && [ -e /etc/debian_version ]; then
17    if [ -d /usr/lib/jvm/default-java ]; then
18       JAVA_HOME="/usr/lib/jvm/default-java"
19    fi
20elif [ $UNIXTYPE = "linux" ] && [ -e /etc/arch-release ]; then
21    if [ -d /usr/lib/jvm/java-7-openjdk ]; then
22        JAVA_HOME="/usr/lib/jvm/java-7-openjdk"
23    elif [ -d /usr/lib/jvm/java-6-openjdk ]; then
24        JAVA_HOME="/usr/lib/jvm/java-6-openjdk"
25    fi
26elif [ $UNIXTYPE = "darwin" ]; then
27    JAVA_HOME=$(/usr/libexec/java_home)
28fi
29
30export JAVA_HOME
Note: See TracBrowser for help on using the repository browser.