[java-identity-provider] 01/02: IDP-1524 - Refresh scripts used by the installer
Scott Cantor
cantor.2 at osu.edu
Mon Jun 22 14:20:12 UTC 2020
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch maint-3.4
in repository java-identity-provider.
View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=b5d644295c1c60da98bca427792a7334b515820a
commit b5d644295c1c60da98bca427792a7334b515820a
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Apr 14 14:31:56 2020 -0400
IDP-1524 - Refresh scripts used by the installer
https://issues.shibboleth.net/jira/browse/IDP-1524
Fix runclass wrapper so JAVA_HOME is optional.
---
.../src/main/resources/bin/runclass.sh | 29 ++++++++++++----------
1 file changed, 16 insertions(+), 13 deletions(-)
diff --git a/idp-distribution/src/main/resources/bin/runclass.sh b/idp-distribution/src/main/resources/bin/runclass.sh
index c151599e1..ad3826f52 100755
--- a/idp-distribution/src/main/resources/bin/runclass.sh
+++ b/idp-distribution/src/main/resources/bin/runclass.sh
@@ -8,15 +8,16 @@ declare LIBDIR
LOCATION=$(dirname $0)
-if [ -z "$JAVA_HOME" ] ; then
- echo "ERROR: JAVA_HOME environment variable is not set."
- exit 1
-else
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD=$JAVA_HOME/jre/sh/java
+if [ -z "$JAVACMD" ] ; then
+ if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD=$JAVA_HOME/jre/sh/java
+ else
+ JAVACMD=$JAVA_HOME/bin/java
+ fi
else
- JAVACMD=$JAVA_HOME/bin/java
+ JAVACMD=$(which java)
fi
fi
@@ -39,12 +40,14 @@ LOCALCLASSPATH="$LOCATION/../dist/webapp/WEB-INF/lib/*":$LOCALCLASSPATH
LOCALCLASSPATH="$LOCATION/../edit-webapp/WEB-INF/lib/*":$LOCALCLASSPATH
LOCALCLASSPATH="$LOCATION/lib/*":$LOCALCLASSPATH
-if [ -f "$JAVA_HOME/lib/tools.jar" ] ; then
- LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/tools.jar
-fi
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -f "$JAVA_HOME/lib/tools.jar" ] ; then
+ LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/tools.jar
+ fi
-if [ -f "$JAVA_HOME/lib/classes.zip" ] ; then
- LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/classes.zip
+ if [ -f "$JAVA_HOME/lib/classes.zip" ] ; then
+ LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/classes.zip
+ fi
fi
"$JAVACMD" '-classpath' "$LOCALCLASSPATH" -Dnet.shibboleth.idp.cli.baseURL=$IDP_BASE_URL "$@"
\ No newline at end of file
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list