From 36092f1cb8fdc4d6fdc4fb539cec1dde8262de3b Mon Sep 17 00:00:00 2001 From: Lyndon Brown Date: Wed, 11 Mar 2020 20:38:51 +0000 Subject: highlight commands in script execution makes reviewing logs in terminal output MUCH more pleasant and efficient Gbp-Dch: Short --- frontend/lb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'frontend') 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}" "${@}" -- cgit v1.2.3