This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 195ab2b2b65413d868557fcb2ae97b1667cca52c
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Jul 24 18:23:16 2019 +0100

    Align with 8.5.x. Use quotes to avoid issues with file paths with spaces
---
 bin/catalina.sh     |  2 +-
 bin/daemon.sh       | 12 ++++++------
 bin/setclasspath.sh |  4 ++--
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/bin/catalina.sh b/bin/catalina.sh
index b6d9035..0d94976 100755
--- a/bin/catalina.sh
+++ b/bin/catalina.sh
@@ -292,7 +292,7 @@ if [ -z "$USE_NOHUP" ]; then
 fi
 unset _NOHUP
 if [ "$USE_NOHUP" = "true" ]; then
-    _NOHUP=nohup
+    _NOHUP="nohup"
 fi
 
 # Add the JAVA 9 specific start-up parameters required by Tomcat
diff --git a/bin/daemon.sh b/bin/daemon.sh
index 9b85343..0e8888b 100755
--- a/bin/daemon.sh
+++ b/bin/daemon.sh
@@ -28,12 +28,12 @@ while [ -h "$PRG" ]; do
   if expr "$link" : '/.*' > /dev/null; then
     PRG="$link"
   else
-    PRG="`dirname $PRG`/$link"
+    PRG=`dirname "$PRG"`/"$link"
   fi
 done
 
-DIRNAME="`dirname $PRG`"
-PROGRAM="`basename $PRG`"
+DIRNAME="`dirname "$PRG"`"
+PROGRAM="`basename "$PRG"`"
 while [ ".$1" != . ]
 do
   case "$1" in
@@ -102,10 +102,10 @@ if [ -z "$JAVA_HOME" ]; then
         if expr "$link" : '/.*' > /dev/null; then
             JAVA_BIN="$link"
         else
-            JAVA_BIN="`dirname $JAVA_BIN`/$link"
+            JAVA_BIN="`dirname "$JAVA_BIN"`/$link"
         fi
     done
-    test -x "$JAVA_BIN" && JAVA_HOME="`dirname $JAVA_BIN`"
+    test -x "$JAVA_BIN" && JAVA_HOME="`dirname "$JAVA_BIN"`"
     test ".$JAVA_HOME" != . && JAVA_HOME=`cd "$JAVA_HOME/.." >/dev/null; pwd`
 else
     JAVA_BIN="$JAVA_HOME/bin/java"
@@ -136,7 +136,7 @@ elif [ -r "$CATALINA_HOME/bin/setenv.sh" ]; then
 fi
 
 # Add on extra jar files to CLASSPATH
-test ".$CLASSPATH" != . && CLASSPATH="${CLASSPATH}:"
+test ".$CLASSPATH" != . && CLASSPATH="$CLASSPATH:"
 
CLASSPATH="$CLASSPATH$CATALINA_HOME/bin/bootstrap.jar:$CATALINA_HOME/bin/commons-daemon.jar"
 
 test ".$CATALINA_OUT" = . && 
CATALINA_OUT="$CATALINA_BASE/logs/catalina-daemon.out"
diff --git a/bin/setclasspath.sh b/bin/setclasspath.sh
index 5232b8e..fed6c5d 100755
--- a/bin/setclasspath.sh
+++ b/bin/setclasspath.sh
@@ -34,8 +34,8 @@ if [ -z "$JAVA_HOME" -a -z "$JRE_HOME" ]; then
   else
     JAVA_PATH=`which java 2>/dev/null`
     if [ "x$JAVA_PATH" != "x" ]; then
-      JAVA_PATH=`dirname $JAVA_PATH 2>/dev/null`
-      JRE_HOME=`dirname $JAVA_PATH 2>/dev/null`
+      JAVA_PATH=`dirname "$JAVA_PATH" 2>/dev/null`
+      JRE_HOME=`dirname "$JAVA_PATH" 2>/dev/null`
     fi
     if [ "x$JRE_HOME" = "x" ]; then
       # XXX: Should we try other locations?


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to