Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Wilkins2013-07-08 04:27:13 +0000
committerGreg Wilkins2013-07-08 04:27:13 +0000
commit2d3f0bfe0b9b949cb8726e71750910bf48eb7472 (patch)
treea51d90ef8581652610b14b9e666f3b56bf3e3389 /jetty-distribution
parent81e92fcc135bae0d440083489efc9dd9be623da9 (diff)
downloadorg.eclipse.jetty.project-2d3f0bfe0b9b949cb8726e71750910bf48eb7472.tar.gz
org.eclipse.jetty.project-2d3f0bfe0b9b949cb8726e71750910bf48eb7472.tar.xz
org.eclipse.jetty.project-2d3f0bfe0b9b949cb8726e71750910bf48eb7472.zip
412466 Improved search for unset JETTY_HOME
Diffstat (limited to 'jetty-distribution')
-rwxr-xr-xjetty-distribution/src/main/resources/bin/jetty.sh12
1 files changed, 7 insertions, 5 deletions
diff --git a/jetty-distribution/src/main/resources/bin/jetty.sh b/jetty-distribution/src/main/resources/bin/jetty.sh
index cbd9f24eb4..c7ab396e2c 100755
--- a/jetty-distribution/src/main/resources/bin/jetty.sh
+++ b/jetty-distribution/src/main/resources/bin/jetty.sh
@@ -188,13 +188,15 @@ if [ -z "$JETTY_HOME" ]
then
JETTY_SH=$0
case "$JETTY_SH" in
- /*) ;;
- ./*) ;;
- *) JETTY_SH=./$JETTY_SH ;;
+ /*) JETTY_HOME=${JETTY_SH%/*/*} ;;
+ ./*/*) JETTY_HOME=${JETTY_SH%/*/*} ;;
+ ./*) JETTY_HOME=.. ;;
+ */*/*) JETTY_HOME=./${JETTY_SH%/*/*} ;;
+ */*) JETTY_HOME=. ;;
+ *) JETTY_HOME=.. ;;
esac
- JETTY_HOME=${JETTY_SH%/*/*}
- if [ ! -f "${JETTY_SH%/*/*}/$JETTY_INSTALL_TRACE_FILE" ]
+ if [ ! -f "$JETTY_HOME/$JETTY_INSTALL_TRACE_FILE" ]
then
JETTY_HOME=
fi

Back to the top