From 31dc75ba5340aa44d5a1a0138479286038821ee0 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: Sat, 6 Feb 2016 20:01:56 +0100 Subject: - Moved log_msg() colour numbers into build.vars. - Changed info level colour to yellow. --- build.subr | 8 ++++---- build.vars | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/build.subr b/build.subr index c7f05bb1..b497c1c3 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 85f00120..5f487971 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}; -- cgit v1.2.3