summaryrefslogtreecommitdiff
path: root/frontend
diff options
context:
space:
mode:
authorLyndon Brown <jnqnfe@gmail.com>2020-03-11 20:38:51 +0000
committerRaphaƫl Hertzog <hertzog@debian.org>2020-03-23 08:06:51 +0000
commit36092f1cb8fdc4d6fdc4fb539cec1dde8262de3b (patch)
tree42865b4d879913302a0a174d964d31825d3ce715 /frontend
parent39dae8cdc737071a6ba8fe2f0b5bf9b35655c5ce (diff)
downloadvyos-live-build-36092f1cb8fdc4d6fdc4fb539cec1dde8262de3b.tar.gz
vyos-live-build-36092f1cb8fdc4d6fdc4fb539cec1dde8262de3b.zip
highlight commands in script execution
makes reviewing logs in terminal output MUCH more pleasant and efficient Gbp-Dch: Short
Diffstat (limited to 'frontend')
-rwxr-xr-xfrontend/lb6
1 files changed, 5 insertions, 1 deletions
diff --git a/frontend/lb b/frontend/lb
index 4a218ddf0..5aa8b1a45 100755
--- a/frontend/lb
+++ b/frontend/lb
@@ -75,5 +75,9 @@ else
exit 1
fi
-Echo "[%s] %s" "$(date +'%F %T')" "lb ${COMMAND} $(echo ${@})"
+_CMD_LABEL="lb ${COMMAND}"
+if [ "${_COLOR_OUT}" = "true" ]; then
+ _CMD_LABEL="${CYAN}${_CMD_LABEL}${NO_COLOR}"
+fi
+Echo "[%s] ${_CMD_LABEL} %s" "$(date +'%F %T')" "$(echo ${@})"
${ENV} exec "${SCRIPT}" "${@}"