Created
September 27, 2015 13:08
-
-
Save jdollar/b97526f7f1d40c0070b2 to your computer and use it in GitHub Desktop.
Grailsw Default JAVA_HOME exports
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# OS specific support (must be 'true' or 'false'). | |
cygwin=false; | |
darwin=false; | |
mingw=false; | |
case "`uname`" in | |
CYGWIN*) | |
cygwin=true | |
;; | |
Darwin*) | |
darwin=true | |
;; | |
MINGW*) | |
mingw=true | |
;; | |
esac | |
# Attempt to set JAVA_HOME if it's not already set | |
if [ -z "$JAVA_HOME" ]; then | |
# Set JAVA_HOME for Darwin | |
if $darwin; then | |
[ -z "$JAVA_HOME" -a -d "/Library/Java/Home" ] && | |
export JAVA_HOME="/Library/Java/Home" | |
[ -z "$JAVA_HOME" -a -d "/System/Library/Frameworks/JavaVM.framework/Home" ] && | |
export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Home" | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment