diff options
author | Lyndon Brown <jnqnfe@gmail.com> | 2020-03-11 20:38:51 +0000 |
---|---|---|
committer | Raphaƫl Hertzog <hertzog@debian.org> | 2020-03-23 08:06:51 +0000 |
commit | 36092f1cb8fdc4d6fdc4fb539cec1dde8262de3b (patch) | |
tree | 42865b4d879913302a0a174d964d31825d3ce715 /frontend | |
parent | 39dae8cdc737071a6ba8fe2f0b5bf9b35655c5ce (diff) | |
download | vyos-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-x | frontend/lb | 6 |
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}" "${@}" |