4 if [ ! -n "$JAVA_HOME" ] ; then
5 echo "Error: JAVA_HOME is not defined."
9 if [ ! -n "$JAVACMD" ] ; then
10 JAVACMD=$JAVA_HOME/bin/java
13 if [ ! -x "$JAVACMD" ] ; then
14 echo "Error: JAVA_HOME is not defined correctly."
15 echo "Cannot execute $JAVACMD"
20 ##Find the shibboleth components
21 if [ ! -n "$SHIB_HOME" ] ; then
22 echo "Error: SHIB_HOME is not defined."
26 if [ ! \( -f "$SHIB_HOME/lib/shib-util.jar" -a -r "$SHIB_HOME/lib/shib-util.jar" \) ] ; then
27 echo "Error: Cannot find the shibboleth jar (shib-util.jar)."
28 echo " If you downloaded the shibboleth source, you need to run \"ant build-util\""
32 ENDORSED=$SHIB_HOME/endorsed/
34 ## Where log4j config file is
35 LOG_CONFIG=$SHIB_HOME/conf/log4j.properties
37 ##Grab all the dependencies
38 if [ -n "$CLASSPATH" ] ; then
39 SHIB_UTIL_CLASSPATH=$CLASSPATH
42 DIRLIBS=${SHIB_HOME}/lib/*.jar
45 # if the directory is empty, then it will return the input string
46 # this is stupid, so case for it
47 if [ "$i" != "${DIRLIBS}" ] ; then
48 if [ -z "$SHIB_UTIL_CLASSPATH" ] ; then
49 SHIB_UTIL_CLASSPATH=$i
51 SHIB_UTIL_CLASSPATH="$i":$SHIB_UTIL_CLASSPATH
56 DIRLIBS=${SHIB_HOME}/webApplication/WEB-INF/lib/*.jar
59 # if the directory is empty, then it will return the input string
60 # this is stupid, so case for it
61 if [ "$i" != "${DIRLIBS}" ] ; then
62 if [ -z "$SHIB_UTIL_CLASSPATH" ] ; then
63 SHIB_UTIL_CLASSPATH=$i
65 SHIB_UTIL_CLASSPATH="$i":$SHIB_UTIL_CLASSPATH
70 SHIB_UTIL_CLASSPATH=$SHIB_UTIL_CLASSPATH:"$SHIB_HOME"
73 $JAVACMD -Djava.endorsed.dirs="$ENDORSED" -Dlog4j.configuration="$LOG_CONFIG" -cp $SHIB_UTIL_CLASSPATH edu.internet2.middleware.shibboleth.utils.ResolverTest "$@"