From a2dfb6a9b9eb62d24c0602cb4a6a744832838130 Mon Sep 17 00:00:00 2001 From: hns Date: Tue, 16 Sep 2003 15:30:53 +0000 Subject: [PATCH] Only check for executable bin/java if JAVA_HOME is set, and if it isn't found, don't exit but just issue a warning and let the script go on. --- build/antclick/hop.sh | 10 +++++----- build/main/hop.sh | 10 +++++----- hop.sh | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/build/antclick/hop.sh b/build/antclick/hop.sh index 1ee2af9a..71927f1f 100755 --- a/build/antclick/hop.sh +++ b/build/antclick/hop.sh @@ -32,11 +32,11 @@ 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 + +# 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 diff --git a/build/main/hop.sh b/build/main/hop.sh index 1ee2af9a..71927f1f 100644 --- a/build/main/hop.sh +++ b/build/main/hop.sh @@ -32,11 +32,11 @@ 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 + +# 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 diff --git a/hop.sh b/hop.sh index 1ee2af9a..71927f1f 100755 --- a/hop.sh +++ b/hop.sh @@ -32,11 +32,11 @@ 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 + +# 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