highlight commands in script execution

makes reviewing logs in terminal output MUCH more pleasant and efficient

Gbp-Dch: Short
This commit is contained in:
Lyndon Brown 2020-03-11 20:38:51 +00:00 committed by Raphaël Hertzog
parent 39dae8cdc7
commit 36092f1cb8
1 changed files with 5 additions and 1 deletions

View File

@ -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}" "${@}"