summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2016-02-06 20:01:56 +0100
committerLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2016-02-06 20:01:56 +0100
commit31dc75ba5340aa44d5a1a0138479286038821ee0 (patch)
treed5d202031e935c8d9dc017d382f5340eeda3b033
parentc497546f591a3cc128abda42d0026c46ffdd6c36 (diff)
downloadmidipix_build-31dc75ba5340aa44d5a1a0138479286038821ee0.tar.bz2
midipix_build-31dc75ba5340aa44d5a1a0138479286038821ee0.tar.xz
- Moved log_msg() colour numbers into build.vars.
- Changed info level colour to yellow.
-rw-r--r--build.subr8
-rw-r--r--build.vars3
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};