]> The Tcpdump Group git mirrors - tcpdump/blobdiff - build_matrix.sh
CI: Switch from bash to POSIX shell.
[tcpdump] / build_matrix.sh
index c00a39df8cede900a177d21c6ffcde4a66e491f2..08fa3eb64618baa246aad040d0a2848e0d9884e1 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/bin/sh -e
 
 # This script executes the matrix loops, exclude tests and cleaning.
 # It calls the build.sh script which runs one build with setup environment
 # MATRIX_CC='gcc clang', MATRIX_CMAKE='no yes', MATRIX_CRYPTO='no yes',
 # MATRIX_SMB='no yes').
 
-set -e
-
-# ANSI color escape sequences
-ANSI_MAGENTA="\\033[35;1m"
-ANSI_RESET="\\033[0m"
 uname -a
 date
 # Install directory prefix
@@ -27,18 +22,18 @@ fi
 COUNT=0
 
 travis_fold() {
-    local action=${1:?}
-    local name=${2:?}
+    tf_action=${1:?}
+    tf_name=${2:?}
     if [ "$TRAVIS" != true ]; then return; fi
-    echo -ne "travis_fold:$action:$LABEL.script.$name\\r"
+    printf 'travis_fold:%s:%s.script.%s\r' "$tf_action" "$LABEL" "$tf_name"
     sleep 1
 }
 
 # Display text in magenta
 echo_magenta() {
-    echo -ne "$ANSI_MAGENTA"
+    printf '\033[35;1m' # ANSI magenta
     echo "$@"
-    echo -ne "$ANSI_RESET"
+    printf '\033[0m' # ANSI reset
 }
 
 build_tcpdump() {