From 3e19f0e4390e26376c130fafb3b0b910f10c4c63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz=20=28arab=2C=20vx?= =?UTF-8?q?p=29?= Date: Tue, 21 Nov 2017 18:05:41 +0000 Subject: build.sh: ensure ${BUILD_SCRIPT_RC} is set correctly. --- build.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 60c78aba..5d213b85 100755 --- a/build.sh +++ b/build.sh @@ -15,8 +15,10 @@ for BUILD_TARGET_LC in $(subst_tgts invariants ${BUILD_TARGETS_META:-world}); do BUILD_PACKAGES="$(lfilter "${BUILD_PACKAGES}" "${BUILD_PACKAGES_RESTART}")"; fi; for PKG_NAME in ${BUILD_PACKAGES}; do - pkg_setup_dispatch "${BUILD_TARGET}" "${PKG_NAME}" "${ARG_RESTART}" "${ARG_RESTART_AT}"; - case "${BUILD_SCRIPT_RC:=${?}}" in + pkg_setup_dispatch "${BUILD_TARGET}" "${PKG_NAME}" \ + "${ARG_RESTART}" "${ARG_RESTART_AT}"; + BUILD_SCRIPT_RC=${?}; + case ${BUILD_SCRIPT_RC} in 0) log_msg succ "Finished \`${PKG_NAME}' build."; : $((BUILD_NFINI+=1)); continue; ;; *) log_msg fail "Build failed in \`${PKG_NAME}' (last return code ${BUILD_SCRIPT_RC}.)."; -- cgit v1.2.3