Skip to content
Permalink
main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
@iay
Latest commit a48c820 May 21, 2024 History
1 contributor

Users who have contributed to this file

executable file 44 lines (37 sloc) 1.03 KB
#! /bin/bash
declare LOCATION
declare COMMAND
declare JAVACMD
declare LOCALCLASSPATH
declare LIBDIR
LOCATION=$0
LOCATION=${LOCATION%/*}
if [ -z "$JAVA_HOME" ] ; then
echo "ERROR: JAVA_HOME environment variable is not set."
exit
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
else
JAVACMD=$JAVA_HOME/bin/java
fi
fi
if [ ! -x "$JAVACMD" ] ; then
echo "Error: JAVA_HOME is not defined correctly."
echo " We cannot execute $JAVACMD"
exit
fi
LOCALCLASSPATH=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/classes.zip
# add in the dependency .jar files from the lib directory
LIBDIR=$LOCATION/lib
LIBS=$LIBDIR/*.jar
for i in $LIBS
do
# if the directory is empty, then it will return the input string
# this is stupid, so case for it
if [ "$i" != "${LIBS}" ] ; then
LOCALCLASSPATH=$LOCALCLASSPATH:"$i"
fi
done
"$JAVACMD" '-classpath' "$LOCALCLASSPATH" $JVMOPTS 'net.shibboleth.metadata.cli.SimpleCommandLine' "$@"