@@ -7,7 +7,6 @@ set -o pipefail
77# Default compiler
88: ${CC:= " gcc" }
99
10- echo " CC=${CC} "
1110
1211# Paths
1312: ${SOURCE_DIR:= " ." }
@@ -30,12 +29,17 @@ export FORCE_SUBREAPER
3029
3130# Our build platform doesn't have those newer Linux flags, but we want Tini to have subreaper support
3231# We also use those in our tests
33- CFLAGS=" -DPR_SET_CHILD_SUBREAPER=36 -DPR_GET_CHILD_SUBREAPER=37"
32+ CFLAGS=" ${CFLAGS-} -DPR_SET_CHILD_SUBREAPER=36 -DPR_GET_CHILD_SUBREAPER=37"
3433if [[ " ${FORCE_SUBREAPER} " -eq 1 ]]; then
3534 # If FORCE_SUBREAPER is requested, then we set those CFLAGS for the Tini build
3635 export CFLAGS
3736fi
3837
38+ echo " CC=${CC} "
39+ echo " CFLAGS=${CFLAGS} "
40+ echo " ARCH_SUFFIX=${ARCH_SUFFIX-} "
41+ echo " ARCH_NATIVE=${ARCH_NATIVE-} "
42+
3943# Ensure Python output is not buffered (to make tests output clearer)
4044export PYTHONUNBUFFERED=1
4145
@@ -53,16 +57,16 @@ cmake "${CMAKE_ARGS[@]}"
5357pushd " ${BUILD_DIR} "
5458make clean
5559make
56- if [[ -n " ${ARCH_NATIVE:= } " ]]; then
60+ if [[ -n " ${ARCH_NATIVE- } " ]]; then
5761 make package
5862fi
5963popd
6064
6165pkg_version=" $( cat " ${BUILD_DIR} /VERSION" ) "
6266
6367
64- if [[ -n " ${ARCH_NATIVE:= } " ]]; then
65- echo " Built native package (ARCH_NATIVE=${ARCH_NATIVE} )"
68+ if [[ -n " ${ARCH_NATIVE- } " ]]; then
69+ echo " Built native package (ARCH_NATIVE=${ARCH_NATIVE- } )"
6670 echo " Running smoke and internal tests"
6771
6872 BIN_TEST_DIR=" ${BUILD_DIR} /bin-test"
@@ -194,7 +198,7 @@ if [[ -n "${ARCH_NATIVE:=}" ]]; then
194198 # Run tests
195199 python " ${SOURCE_DIR} /test/run_inner_tests.py"
196200else
197- if [[ ! -n " ${ARCH_SUFFIX:= } " ]]; then
201+ if [[ ! -n " ${ARCH_SUFFIX- } " ]]; then
198202 echo " Built cross package, but $ARCH_SUFFIX is empty!"
199203 exit 1
200204 fi
@@ -210,30 +214,30 @@ mkdir -p "${DIST_DIR}"
210214TINIS=()
211215
212216for tini in tini tini-static; do
213- if [[ -n " ${ARCH_SUFFIX:= } " ]]; then
217+ if [[ -n " ${ARCH_SUFFIX- } " ]]; then
214218 to=" ${DIST_DIR} /${tini} -${ARCH_SUFFIX} "
215219 TINIS+=(" $to " )
216220 cp " ${BUILD_DIR} /${tini} " " $to "
217221 fi
218222
219- if [[ -n " ${ARCH_NATIVE:= } " ]]; then
223+ if [[ -n " ${ARCH_NATIVE- } " ]]; then
220224 to=" ${DIST_DIR} /${tini} "
221225 TINIS+=(" $to " )
222226 cp " ${BUILD_DIR} /${tini} " " $to "
223227 fi
224228done
225229
226- if [[ -n " ${ARCH_NATIVE:= } " ]]; then
230+ if [[ -n " ${ARCH_NATIVE- } " ]]; then
227231 for pkg_format in deb rpm; do
228232 src=" ${BUILD_DIR} /tini_${pkg_version} .${pkg_format} "
229233
230- if [[ -n " ${ARCH_SUFFIX:= } " ]]; then
234+ if [[ -n " ${ARCH_SUFFIX- } " ]]; then
231235 to=" ${DIST_DIR} /tini_${pkg_version} -${ARCH_SUFFIX} .${pkg_format} "
232236 TINIS+=(" $to " )
233237 cp " $src " " $to "
234238 fi
235239
236- if [[ -n " ${ARCH_NATIVE:= } " ]]; then
240+ if [[ -n " ${ARCH_NATIVE- } " ]]; then
237241 to=" ${DIST_DIR} /tini_${pkg_version} .${pkg_format} "
238242 TINIS+=(" $to " )
239243 cp " $src " " $to "
0 commit comments