Author: markt
Date: Thu Jul 5 09:06:44 2018
New Revision: 1835111
URL: http://svn.apache.org/viewvc?rev=1835111&view=rev
Log:
Replace [ a -a b ] with [ a ] && [ b ] as recommended by shellcheck.net
Modified:
tomcat/trunk/bin/daemon.sh
tomcat/trunk/bin/setclasspath.sh
Modified: tomcat/trunk/bin/daemon.sh
URL:
http://svn.apache.org/viewvc/tomcat/trunk/bin/daemon.sh?rev=1835111&r1=1835110&r2=1835111&view=diff
==============================================================================
--- tomcat/trunk/bin/daemon.sh (original)
+++ tomcat/trunk/bin/daemon.sh Thu Jul 5 09:06:44 2018
@@ -168,7 +168,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"
Modified: tomcat/trunk/bin/setclasspath.sh
URL:
http://svn.apache.org/viewvc/tomcat/trunk/bin/setclasspath.sh?rev=1835111&r1=1835110&r2=1835111&view=diff
==============================================================================
--- tomcat/trunk/bin/setclasspath.sh (original)
+++ tomcat/trunk/bin/setclasspath.sh Thu Jul 5 09:06:44 2018
@@ -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" ]
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: [email protected]
For additional commands, e-mail: [email protected]