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 shibboleth utility jar."
28 echo " If you downloaded the shibboleth source, you need to run \"ant build-util\""
32 if [ ! -n "$ARP_DIR" ] ; then
33 echo "Warning: Using working directory for ARP storage. Define ARP_DIR to use another directory."
37 if [ ! -n "$LOG_CONFIG" ] ; then
38 LOG_CONFIG=$SHIB_HOME/conf/log4j.properties
42 ##Grab all the dependencies
43 if [ -n "$CLASSPATH" ] ; then
44 SHIB_UTIL_CLASSPATH=$CLASSPATH
47 DIRLIBS=${SHIB_HOME}/lib/*.jar
50 # if the directory is empty, then it will return the input string
51 # this is stupid, so case for it
52 if [ "$i" != "${DIRLIBS}" ] ; then
53 if [ -z "$SHIB_UTIL_CLASSPATH" ] ; then
54 SHIB_UTIL_CLASSPATH=$i
56 SHIB_UTIL_CLASSPATH="$i":$SHIB_UTIL_CLASSPATH
63 $JAVACMD -Dlog.config=$LOG_CONFIG -Darp.dir=$ARP_DIR -classpath $SHIB_UTIL_CLASSPATH edu.internet2.middleware.shibboleth.utils.ArpUtil "$@"