* Unify check for JAVA_HOME and JAVACMD executable. The latter didn't work on Mac OS X.

This commit is contained in:
hns 2006-05-26 10:34:44 +00:00
parent e7a7969e9d
commit 412ba832d2

View file

@ -28,17 +28,15 @@ HTTP_PORT=8080
# must be contained in PATH variable.
if [ "$JAVA_HOME" ]; then
JAVACMD="$JAVA_HOME/bin/java"
# Check if java command is executable
if [ ! -x $JAVACMD ]; then
echo "Warning: JAVA_HOME variable may be set incorrectly:"
echo " No executable found at $JAVACMD"
fi
else
JAVACMD=java
fi
# If JAVA_HOME is set, check if java command is executable
if [ $JAVA_HOME -a ! -x $JAVACMD ] ; then
echo "Warning: JAVA_HOME variable may be set incorrectly:"
echo " No executable found at $JAVACMD"
fi
# Get the Helma installation directory
INSTALL_DIR="${0%/*}"
cd $INSTALL_DIR