]> The Tcpdump Group git mirrors - tcpdump/blobdiff - build.sh
CI: Switch from bash to POSIX shell.
[tcpdump] / build.sh
index 5d3592edaf54c49b292875f282211cf690aff079..4fe1ef0fc2fef0c0a32448e165b16cfae2ed7ec2 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -1,11 +1,9 @@
-#!/usr/bin/env bash
+#!/bin/sh -e
 
 # This script runs one build with setup environment variables: BUILD_LIBPCAP,
 # REMOTE, CC, CMAKE, CRYPTO and SMB
 # (default: BUILD_LIBPCAP=no, REMOTE=no, CC=gcc, CMAKE=no, CRYPTO=no, SMB=no).
 
-set -e
-
 # BUILD_LIBPCAP: no or yes
 BUILD_LIBPCAP=${BUILD_LIBPCAP:-no}
 # REMOTE: no or yes
@@ -30,16 +28,16 @@ fi
 export TCPDUMP_BIN="$PREFIX/bin/tcpdump"
 
 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
 }
 
 # Run a command after displaying it
 run_after_echo() {
-    echo -n '$ '
+    printf '$ '
     echo "$@"
     # shellcheck disable=SC2068
     $@