Polish and simplify spring bash script

pull/10/head
Phillip Webb 11 years ago
parent a9700c92f3
commit 8a19e48e21

@ -18,7 +18,6 @@ if $cygwin ; then
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi
# Attempt to find JAVA_HOME if not already set
if [ -z "${JAVA_HOME}" ]; then
if $darwin ; then
@ -78,19 +77,11 @@ if [ ! -d "${SPRING_HOME}" ]; then
exit 2
fi
for f in "${SPRING_HOME}"/classes "${SPRING_HOME}"/*.jar "${SPRING_HOME}"/lib/*.jar; do
if [ -f $f -o -d $f ]; then
if [ "${CLASSPATH}" == "" ]; then
CLASSPATH="${f}"
else
CLASSPATH="${CLASSPATH}":"${f}"
fi
fi
done
CLASSPATH="${SPRING_HOME}/lib/*"
if $cygwin; then
SPRING_HOME=`cygpath --path --mixed "$SPRING_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
fi
"${JAVA_HOME}/bin/java ${JAVA_OPTS}" -cp "$CLASSPATH" org.springframework.boot.cli.SpringCli $*
"${JAVA_HOME}/bin/java" ${JAVA_OPTS} -cp "$CLASSPATH" org.springframework.boot.cli.SpringCli $*

Loading…
Cancel
Save