summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de>2018-01-23 12:34:11 +0000
committerLucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de>2018-01-23 12:34:11 +0000
commit02c235335590a28be636d8d8e7b3704f4685662b (patch)
treeeaa788bfb5bb23aaca213b758c10d92156f88c9c
parentf14ffca5fe5dca891200d5b7898d373b4f987427 (diff)
downloadmidipix_build-02c235335590a28be636d8d8e7b3704f4685662b.tar.bz2
midipix_build-02c235335590a28be636d8d8e7b3704f4685662b.tar.xz
build.sh:start_build: check ${ARG_RESTART} for unknown packages, if specified.
-rwxr-xr-xbuild.sh13
1 files changed, 12 insertions, 1 deletions
diff --git a/build.sh b/build.sh
index 0d8d5546..87385c93 100755
--- a/build.sh
+++ b/build.sh
@@ -4,13 +4,24 @@
buildp_dispatch() {
local _msg="${1}" _pkg_name="${2}" _tgt_name="${3}" \
- _build_tgt_meta _build_tgt_lc;
+ _build_tgt_meta _build_tgt_lc _build_tgt_pkg_names _build_tgt_uc;
case "${_msg}" in
# Top-level
start_build) shift; build_args "${@}"; build_init; build_checks;
ex_rtl_log_set_vnfo_lvl "${ARG_VERBOSE:-0}";
ex_rtl_log_msg info "Build started by ${BUILD_USER:=${USER}}@${BUILD_HNAME:=$(hostname)} at ${BUILD_DATE_START}.";
ex_rtl_log_env_vars "build (global)" ${DEFAULT_LOG_ENV_VARS};
+ if [ -n "${ARG_RESTART}" ]; then
+ _build_tgt_pkg_names="";
+ for _build_tgt_lc in ${BUILD_TARGETS:-${TARGETS_DEFAULT}}; do
+ _build_tgt_uc="$(ex_rtl_toupper "${_build_tgt_lc}")";
+ _build_tgt_pkg_names="${_build_tgt_pkg_names:+${_build_tgt_pkg_names} }$(ex_rtl_get_var_unsafe ${_build_tgt_uc}_PACKAGES)";
+ done;
+ _build_tgt_pkg_names="$(ex_rtl_lfilter_not "${ARG_RESTART}" "${_build_tgt_pkg_names}")";
+ if [ -n "${_build_tgt_pkg_names}" ]; then
+ ex_rtl_log_msg failexit "Error: package(s) \`${_build_tgt_pkg_names}' unknown.";
+ fi;
+ fi;
for _build_tgt_lc in ${BUILD_TARGETS:-${TARGETS_DEFAULT}}; do
ex_pkg_dispatch "${_build_tgt_lc}" \
"${ARG_RESTART}" "${ARG_RESTART_AT}" \