Skip to content

Instantly share code, notes, and snippets.

@berngp
Last active August 29, 2015 14:01
Show Gist options
  • Save berngp/3f6563e54c72d62f9d23 to your computer and use it in GitHub Desktop.
Save berngp/3f6563e54c72d62f9d23 to your computer and use it in GitHub Desktop.
ZSH Function Wrappers for JDK and SCALA HOME setup.
with-scala210 with-jdk7 ./make-distribution.sh --hadoop=2.4.0 --tgz --name=mesos-hadoop-2.4.0
export JAVA7_HOME="$(/usr/libexec/java_home -v 1.7)"
function with-jdk7
{
export JAVA_HOME="$JAVA7_HOME"
echo "$@"
$@
}
export JAVA8_HOME="$(/usr/libexec/java_home -v 1.8)"
function with-jdk8
{
export JAVA_HOME="$JAVA8_HOME"
echo "$@"
$@
}
export SCALA10_HOME="$HOMEBREW_ROOT/Cellar/scala/2.10.4"
function with-scala210
{
export SCALA_HOME="$SCALA10_HOME"
echo "$@"
$@
}
export SCALA11_HOME="$HOMEBREW_ROOT/Cellar/scala/2.11.2"
function with-scala211
{
export SCALA_HOME="$SCALA_HOME"
echo "$@"
$@
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment