summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.cirrus.yml2
-rwxr-xr-xbuild.sh12
-rwxr-xr-xbuild_matrix.sh17
3 files changed, 12 insertions, 19 deletions
diff --git a/.cirrus.yml b/.cirrus.yml
index 323d3234..43dd183f 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -22,7 +22,7 @@ freebsd_task:
MATRIX_CC: clang gcc48 gcc10
script:
- pkg install -qy autoconf gcc48 gcc10
- - pkg install -qy bash cmake git # for build_matrix.sh and build.sh
+ - pkg install -qy cmake git # for build_matrix.sh and build.sh
- ./build_matrix.sh
linux_task:
diff --git a/build.sh b/build.sh
index e14ea68e..da96e80e 100755
--- a/build.sh
+++ b/build.sh
@@ -1,10 +1,8 @@
-#!/usr/bin/env bash
+#!/bin/sh -e
# This script runs one build with setup environment variables: CC, CMAKE and
# REMOTE (default: CC=gcc, CMAKE=no, REMOTE=no).
-set -e
-
# CC: gcc or clang
CC=${CC:-gcc}
# GCC and Clang recognize --version and print to stdout. Sun compilers
@@ -22,16 +20,16 @@ if [ -z "$PREFIX" ]; then
fi
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
$@
diff --git a/build_matrix.sh b/build_matrix.sh
index 9b4fad57..bceaf312 100755
--- a/build_matrix.sh
+++ b/build_matrix.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/bin/sh -e
# This script executes the matrix loops, exclude tests and cleaning.
# The matrix can be configured with environment variables MATRIX_CC,
@@ -7,11 +7,6 @@
# It calls the build.sh script which runs one build with setup environment
# variables : CC, CMAKE and REMOTE (default: CC=gcc, CMAKE=no, REMOTE=no).
-set -e
-
-# ANSI color escape sequences
-ANSI_MAGENTA="\\033[35;1m"
-ANSI_RESET="\\033[0m"
uname -a
date
# Install directory prefix
@@ -23,18 +18,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
}
touch .devel configure