From 9ad97cba023ed5790b556d9513d7998608abdf6b 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: Thu, 5 Apr 2018 00:20:11 +0000 Subject: subr/build_{checks,init}.subr: move --as-needed exit check in order to prevent clobbering build.log. --- subr/build_checks.subr | 6 ------ subr/build_init.subr | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/subr/build_checks.subr b/subr/build_checks.subr index 5abeab20..055ed870 100644 --- a/subr/build_checks.subr +++ b/subr/build_checks.subr @@ -33,12 +33,6 @@ build_checks() { if [ ${_exit:-0} = 1 ]; then exit 1; fi; - if [ "${ARG_AS_NEEDED:-0}" -eq 1 ]\ - && [ -e "${PREFIX}/build.gitref" ]\ - && [ "$(git rev-parse HEAD)" = "$(cat "${PREFIX}/build.gitref")" ]; then - ex_rtl_log_msg info "Git repository has not changed since last build and --as-needed was specified."; - exit 0; - fi; if [ ${ARG_CLEAN:-0} -eq 1 ]; then ex_rtl_log_msg info "-c specified, cleaning prefix..."; for _pname in ${DEFAULT_CLEAR_PREFIX_PATHS}; do diff --git a/subr/build_init.subr b/subr/build_init.subr index e940110f..8b065083 100644 --- a/subr/build_init.subr +++ b/subr/build_init.subr @@ -33,6 +33,12 @@ build_init() { for __ in ${HOME}/midipix_build.vars ../midipix_build.vars ./vars/env.vars ./vars/midipix.vars ./vars/build.vars; do [ -e ${__} ] && . ${__}; done; + if [ "${ARG_AS_NEEDED:-0}" -eq 1 ]\ + && [ -e "${PREFIX}/build.gitref" ]\ + && [ "$(git rev-parse HEAD)" = "$(cat "${PREFIX}/build.gitref")" ]; then + ex_rtl_log_msg info "Git repository has not changed since last build and --as-needed was specified."; + exit 0; + fi; export PATH="${PREFIX}/bin${PATH:+:${PATH}}"; if [ ${ARG_IPV4_ONLY:-0} -eq 1 ]; then DEFAULT_WGET_ARGS="-4${DEFAULT_WGET_ARGS:+ ${DEFAULT_WGET_ARGS}}"; -- cgit v1.2.3