Commit 8a19e48e authored by Phillip Webb's avatar Phillip Webb

Polish and simplify spring bash script

parent a9700c92
...@@ -18,7 +18,6 @@ if $cygwin ; then ...@@ -18,7 +18,6 @@ if $cygwin ; then
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi fi
# Attempt to find JAVA_HOME if not already set # Attempt to find JAVA_HOME if not already set
if [ -z "${JAVA_HOME}" ]; then if [ -z "${JAVA_HOME}" ]; then
if $darwin ; then if $darwin ; then
...@@ -78,19 +77,11 @@ if [ ! -d "${SPRING_HOME}" ]; then ...@@ -78,19 +77,11 @@ if [ ! -d "${SPRING_HOME}" ]; then
exit 2 exit 2
fi fi
for f in "${SPRING_HOME}"/classes "${SPRING_HOME}"/*.jar "${SPRING_HOME}"/lib/*.jar; do CLASSPATH="${SPRING_HOME}/lib/*"
if [ -f $f -o -d $f ]; then
if [ "${CLASSPATH}" == "" ]; then
CLASSPATH="${f}"
else
CLASSPATH="${CLASSPATH}":"${f}"
fi
fi
done
if $cygwin; then if $cygwin; then
SPRING_HOME=`cygpath --path --mixed "$SPRING_HOME"` SPRING_HOME=`cygpath --path --mixed "$SPRING_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
fi 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 $*
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment