cpt

[ARCHIVED] Carbs Packaging Tools
git clone git://git.ckyln.com/~cem/cpt.git
Log | Files | Refs | README | LICENSE

commit f7fdd81634795f2dd89e59819f0de3416ce56b28
parent 60ac1c094e68214f93d756446ff67ee6109ff793
Author: Dylan Araps <dylan.araps@gmail.com>
Date:   Tue, 28 Jan 2020 10:19:47 +0200

kiss: send all messages to stderr

Diffstat:
Mkiss | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/kiss b/kiss @@ -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 }