diff options
author | Lucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de> | 2017-06-01 11:43:59 +0000 |
---|---|---|
committer | Lucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de> | 2017-06-01 11:43:59 +0000 |
commit | ceeb88d755d8fd3445fa27685b9171d30b17c2c4 (patch) | |
tree | e2729653ec92810e94425a4dee667025934a71a1 | |
parent | f3562be2bbdcf4bd4ccf17bf453dcc23dc25c639 (diff) | |
download | midipix_build-ceeb88d755d8fd3445fa27685b9171d30b17c2c4.tar.bz2 midipix_build-ceeb88d755d8fd3445fa27685b9171d30b17c2c4.tar.xz |
build.sh, subr/pre_build_files.subr: log list of failed build scripts when using relaxed mode (-R).
-rwxr-xr-x | build.sh | 11 | ||||
-rw-r--r-- | subr/pre_build_files.subr | 1 |
2 files changed, 11 insertions, 1 deletions
@@ -117,7 +117,12 @@ for BUILD_TARGET_LC in $(subst_tgts invariants ${BUILD_TARGETS_META:-world}); do : $((BUILD_NFINI+=1)); continue; ;; *) log_msg fail "Build failed in \`${PKG_NAME}' (last return code ${BUILD_SCRIPT_RC}.)."; : $((BUILD_NFAIL+=1)); - [ ${ARG_RELAXED:-0} -eq 0 ] && break || continue; ;; + if [ ${ARG_RELAXED:-0} -eq 1 ]; then + BUILD_PKGS_FAILED="${BUILD_PKGS_FAILED:+${BUILD_PKGS_FAILED} }${PKG_NAME}"; + continue; + else + break; + fi; esac; done; if [ "${BUILD_SCRIPT_RC:-0}" -ne 0 ]; then @@ -130,6 +135,10 @@ fi; post_build_files; log_msg info "${BUILD_NFINI} finished, ${BUILD_NSKIP} skipped, and ${BUILD_NFAIL} failed builds in ${BUILD_NBUILT} build script(s)."; log_msg info "Build time: ${BUILD_TIMES_HOURS} hour(s), ${BUILD_TIMES_MINUTES} minute(s), and ${BUILD_TIMES_SECS} second(s)."; +if [ ${ARG_RELAXED:-0} -eq 1 ]\ +&& [ -n "${BUILD_PKGS_FAILED}" ]; then + log_msg info "Build script failure(s) in: ${BUILD_PKGS_FAILED}."; +fi; exit "${BUILD_SCRIPT_RC}")} 2>&1 | tee "${BUILD_LOG_FNAME}" & TEE_PID="${!}"; trap "rm -f ${BUILD_STATUS_IN_PROGRESS_FNAME}; \ log_msg fail \"Build aborted.\"; \ diff --git a/subr/pre_build_files.subr b/subr/pre_build_files.subr index 700ea740..3fbcf0cb 100644 --- a/subr/pre_build_files.subr +++ b/subr/pre_build_files.subr @@ -14,6 +14,7 @@ pre_build_files() { BUILD_DATE_START="$(date %Y-%m-%d-%H-%M-%S)"; BUILD_NFINI=${BUILD_NSKIP:=${BUILD_NFAIL:=${BUILD_NBUILT:=0}}}; BUILD_TIMES_SECS=$(command date +%s); + BUILD_PKGS_FAILED=""; }; # vim:filetype=sh |