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 "$IDP_HOME" ] ; then
22 echo "Error: IDP_HOME is not defined."
26 if [ ! \( -f "$IDP_HOME/lib/shib-util.jar" -a -r "$IDP_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=$IDP_HOME/endorsed/
34 ##Grab all the dependencies
35 if [ -n "$CLASSPATH" ] ; then
36 SHIB_UTIL_CLASSPATH=$CLASSPATH
39 DIRLIBS=${IDP_HOME}/lib/*.jar
42 # if the directory is empty, then it will return the input string
43 # this is stupid, so case for it
44 if [ "$i" != "${DIRLIBS}" ] ; then
45 if [ -z "$SHIB_UTIL_CLASSPATH" ] ; then
46 SHIB_UTIL_CLASSPATH=$i
48 SHIB_UTIL_CLASSPATH="$i":$SHIB_UTIL_CLASSPATH
53 SHIB_UTIL_CLASSPATH=$SHIB_UTIL_CLASSPATH:"$IDP_HOME"
56 $JAVACMD -Djava.endorsed.dirs="$ENDORSED" -cp $SHIB_UTIL_CLASSPATH edu.internet2.middleware.shibboleth.utils.ResolverTest "$@"