corretly escape $darwin condition
@@ -81,7 +81,7 @@ Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# For Darwin, find JAVA_HOME for 1.8
-elif $darwin; then
+elif \$darwin; then
JAVA_HOME=`/usr/libexec/java_home -v 1.8`
JAVACMD="\$JAVA_HOME/bin/java"
else
