From 7ca2cfee88594abf74a5b05579c7e941c0eb34ef Mon Sep 17 00:00:00 2001 From: bill-auger Date: Sun, 22 Apr 2018 23:51:07 -0400 Subject: trace run_once --- configs/profile/build.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'configs/profile') diff --git a/configs/profile/build.sh b/configs/profile/build.sh index 40b5404..e61472c 100755 --- a/configs/profile/build.sh +++ b/configs/profile/build.sh @@ -61,12 +61,18 @@ _usage () exit ${1} } +LOG_STEP() { printf "\033[01;34m%s\033[00m\n" "$(echo -e $*)" ; } +LOG_ERROR() { printf "\033[00;31m%s\033[00m\n" "$(echo -e $*)" ; } + # Helper function to run make_*() only one time per architecture. run_once() { - if [[ ! -e ${work_dir}/build.${1}_${arch} ]]; then + local buid_stamp="build.${1}_${arch}" + + if [[ ! -e ${work_dir}/${buid_stamp} ]]; then + LOG_STEP "runnning build step: '${buid_stamp}'" $1 - touch ${work_dir}/build.${1}_${arch} + touch ${work_dir}/${buid_stamp} fi } -- cgit v1.2.2