jpeach commented on code in PR #9757:
URL: https://github.com/apache/trafficserver/pull/9757#discussion_r1212434379


##########
ci/coverage:
##########
@@ -16,36 +16,43 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
+set -o errexit
+set -o pipefail
+
 LCOV=${LCOV:-lcov}
 GENHTML=${GENHTML:-genhtml}
 
 TMPDIR=${TMPDIR:-/tmp}
 BUILDID="org.apache.trafficserver.$$"
 
-SRCROOT=${SRCROOT:-$(cd $(dirname $0)/.. && pwd)} # where the source lives
+SRCROOT=${SRCROOT:-$(cd "$(dirname "$0")/.." && pwd)} # where the source lives
 OBJROOT=${OBJROOT:-"$TMPDIR/$BUILDID/obj"} # where we are building
 DSTROOT=${DSTROOT:-"$TMPDIR/$BUILDID/dst"} # where we are installing
 
 # Force low make parallelization so that the build can complete in a VM with
 # only a small amount of memory.
 NPROCS=${NPROCS:-2}
 
-mkdir -p $SRCROOT
-mkdir -p $OBJROOT
-mkdir -p $DSTROOT
+mkdir -p "$SRCROOT"
+mkdir -p "$OBJROOT"
+mkdir -p "$DSTROOT"
 
 autogen() {
   (
     cd "$SRCROOT"
-    [ configure -nt configure.ac -a Makefile.in -nt Makefile.am ] || 
autoreconf -fi
+    if [ configure -nt configure.ac ] && [ Makefile.in -nt Makefile.am ] ; then
+        :
+    else
+        autoreconf -fi
+    fi

Review Comment:
   This change is based on https://www.shellcheck.net/wiki/SC2166.The work 
happens in the else because I didn't want to invert the conditional.
   
   I do agree that it looks a bit weird :)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to