diff options
author | dylan.araps@gmail.com <dylan.araps@gmail.com> | 2020-01-28 08:19:47 +0000 |
---|---|---|
committer | dylan.araps@gmail.com <dylan.araps@gmail.com> | 2020-01-28 08:19:47 +0000 |
commit | d206e724c150bc3aebefa464675290c8faabf163 (patch) | |
tree | c3873b3b5b1fb9e8ab12a0abd46191a1fa137835 /kiss | |
parent | e8c75ee1c0d30a2eaa3835240963c81146c508b1 (diff) | |
download | cpt-d206e724c150bc3aebefa464675290c8faabf163.tar.gz |
kiss: send all messages to stderr
FossilOrigin-Name: 4d79fb04d2724c431d7c37501e37eae5a1f45d7a8342a89aaa566dee129c066b
Diffstat (limited to 'kiss')
-rwxr-xr-x | kiss | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -15,18 +15,21 @@ log() { # Print a message prettily. # + # All messages are printed to stderr to allow the user to hide build + # output which is the only thing printed to stdout. + # # '\033[1;32m' Set text to color '2' and make it bold. # '\033[m': Reset text formatting. # '${3:-->}': If the 3rd argument is missing, set prefix to '->'. # '${2:+\033[1;3Xm}': If the 2nd argument exists, set text style of '$1'. # '${2:+\033[m}': If the 2nd argument exists, reset text formatting. printf '\033[1;33m%s \033[m%b%s\033[m %s\n' \ - "${3:-->}" "${2:+\033[1;36m}" "$1" "$2" + "${3:-->}" "${2:+\033[1;36m}" "$1" "$2" >&2 } die() { # Print a message and exit with '1' (error). - log "$1" "$2" "!>" >&2 + log "$1" "$2" "!>" exit 1 } |