Added test if final java command exists and is executable and print
a decent error message if not.
This commit is contained in:
parent
3d3b839395
commit
7476233449
3 changed files with 24 additions and 3 deletions
|
@ -32,13 +32,20 @@ else
|
|||
JAVACMD=java
|
||||
fi
|
||||
|
||||
# Check if java command is executable
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
echo "Error: JAVA_HOME is not defined correctly."
|
||||
echo " We cannot execute $JAVACMD"
|
||||
exit
|
||||
fi
|
||||
|
||||
# Get the Helma installation directory
|
||||
INSTALL_DIR="${0%/*}"
|
||||
cd $INSTALL_DIR
|
||||
INSTALL_DIR=$PWD
|
||||
|
||||
# get HOP_HOME variable if it isn't set
|
||||
if test -z "$HOP_HOME"; then
|
||||
if [ -z "$HOP_HOME" ]; then
|
||||
# try to get HOP_HOME from script file and pwd
|
||||
# strip everyting behind last slash
|
||||
HOP_HOME="${0%/*}"
|
||||
|
|
|
@ -32,13 +32,20 @@ else
|
|||
JAVACMD=java
|
||||
fi
|
||||
|
||||
# Check if java command is executable
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
echo "Error: JAVA_HOME is not defined correctly."
|
||||
echo " We cannot execute $JAVACMD"
|
||||
exit
|
||||
fi
|
||||
|
||||
# Get the Helma installation directory
|
||||
INSTALL_DIR="${0%/*}"
|
||||
cd $INSTALL_DIR
|
||||
INSTALL_DIR=$PWD
|
||||
|
||||
# get HOP_HOME variable if it isn't set
|
||||
if test -z "$HOP_HOME"; then
|
||||
if [ -z "$HOP_HOME" ]; then
|
||||
# try to get HOP_HOME from script file and pwd
|
||||
# strip everyting behind last slash
|
||||
HOP_HOME="${0%/*}"
|
||||
|
|
9
hop.sh
9
hop.sh
|
@ -32,13 +32,20 @@ else
|
|||
JAVACMD=java
|
||||
fi
|
||||
|
||||
# Check if java command is executable
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
echo "Error: JAVA_HOME is not defined correctly."
|
||||
echo " We cannot execute $JAVACMD"
|
||||
exit
|
||||
fi
|
||||
|
||||
# Get the Helma installation directory
|
||||
INSTALL_DIR="${0%/*}"
|
||||
cd $INSTALL_DIR
|
||||
INSTALL_DIR=$PWD
|
||||
|
||||
# get HOP_HOME variable if it isn't set
|
||||
if test -z "$HOP_HOME"; then
|
||||
if [ -z "$HOP_HOME" ]; then
|
||||
# try to get HOP_HOME from script file and pwd
|
||||
# strip everyting behind last slash
|
||||
HOP_HOME="${0%/*}"
|
||||
|
|
Loading…
Add table
Reference in a new issue