From 31dc75ba5340aa44d5a1a0138479286038821ee0 Mon Sep 17 00:00:00 2001 From: Lucio Andrés Illanes Albornoz (arab, vxp) Date: Feb 06 2016 19:01:56 +0000 Subject: - Moved log_msg() colour numbers into build.vars. - Changed info level colour to yellow. --- diff --git a/build.subr b/build.subr index c7f05bb..b497c1c 100644 --- a/build.subr +++ b/build.subr @@ -1,5 +1,5 @@ # -# set -o errexit is assumed. +# . ./build.vars and set -o errexit are assumed. # TIMESTAMP_FMT="${TIMESTAMP_FMT:-"%Y/%m/%d %H:%M:%S"}"; @@ -66,9 +66,9 @@ set_build_script_done() { log_msg() { _lvl=${1}; shift; case ${_lvl} in - fail) printf "\033[91m"; ;; - info) printf "\033[97m"; ;; - succ) printf "\033[92m"; ;; + fail) printf "\033[${LOG_MSG_FAIL_COLOUR}m"; ;; + info) printf "\033[${LOG_MSG_INFO_COLOUR}m"; ;; + succ) printf "\033[${LOG_MSG_SUCC_COLOUR}m"; ;; esac; if [ $# -gt 1 ]; then printf "==> %s %s %s\033[0m\n" "$(date +"${TIMESTAMP_FMT}")" "${1}" "$*"; diff --git a/build.vars b/build.vars index 85f0012..5f48797 100644 --- a/build.vars +++ b/build.vars @@ -8,6 +8,9 @@ : ${CFLAGS_PACKAGES:=-g3 -O0}; : ${GITROOT:=git://midipix.org}; : ${HOST_NATIVE:=x86_64-nt64-midipix}; +: ${LOG_MSG_FAIL_COLOUR:=91}; +: ${LOG_MSG_INFO_COLOUR:=93}; +: ${LOG_MSG_SUCC_COLOUR:=92}; : ${PREFIX:=${HOME}/midipix}; : ${PREFIX_NATIVE:=${PREFIX}/native}; : ${TARGET:=x86_64-nt64-midipix};