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

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

commit 97ba46b439eeb2a1d2a02dc5bb19c9fd29a67630
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Jul 5 09:06:44 2018 +0000

    Replace [ a -a b ] with [ a ] && [ b ] as recommended by shellcheck.net
    
    git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1835111 
13f79535-47bb-0310-9956-ffa450edef68
---
 bin/daemon.sh       | 2 +-
 bin/setclasspath.sh | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/bin/daemon.sh b/bin/daemon.sh
index 0e8888b..afa4c89 100755
--- a/bin/daemon.sh
+++ b/bin/daemon.sh
@@ -170,7 +170,7 @@ if [ "$cygwin" = "false" ]; then
     MAX_FD_LIMIT=`ulimit -H -n`
     if [ "$?" -eq 0 ]; then
         # Darwin does not allow RLIMIT_INFINITY on file soft limit
-        if [ "$darwin" = "true" -a "$MAX_FD_LIMIT" = "unlimited" ]; then
+        if [ "$darwin" = "true" ] && [ "$MAX_FD_LIMIT" = "unlimited" ]; then
             MAX_FD_LIMIT=`/usr/sbin/sysctl -n kern.maxfilesperproc`
         fi
         test ".$MAX_FD" = ".maximum" && MAX_FD="$MAX_FD_LIMIT"
diff --git a/bin/setclasspath.sh b/bin/setclasspath.sh
index 5232b8e..9960bd1 100755
--- a/bin/setclasspath.sh
+++ b/bin/setclasspath.sh
@@ -22,7 +22,7 @@
 # -----------------------------------------------------------------------------
 
 # Make sure prerequisite environment variables are set
-if [ -z "$JAVA_HOME" -a -z "$JRE_HOME" ]; then
+if [ -z "$JAVA_HOME" ] && [ -z "$JRE_HOME" ]; then
   if $darwin; then
     # Bugzilla 54390
     if [ -x '/usr/libexec/java_home' ] ; then
@@ -44,13 +44,13 @@ if [ -z "$JAVA_HOME" -a -z "$JRE_HOME" ]; then
       fi
     fi
   fi
-  if [ -z "$JAVA_HOME" -a -z "$JRE_HOME" ]; then
+  if [ -z "$JAVA_HOME" ] && [ -z "$JRE_HOME" ]; then
     echo "Neither the JAVA_HOME nor the JRE_HOME environment variable is 
defined"
     echo "At least one of these environment variable is needed to run this 
program"
     exit 1
   fi
 fi
-if [ -z "$JAVA_HOME" -a "$1" = "debug" ]; then
+if [ -z "$JAVA_HOME" ] && [ "$1" = "debug" ]; then
   echo "JAVA_HOME should point to a JDK in order to run in debug mode."
   exit 1
 fi


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

Reply via email to