aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCem Keylan <cem@ckyln.com>2020-08-13 11:38:17 +0300
committerCem Keylan <cem@ckyln.com>2020-08-13 11:38:17 +0300
commitdcd4d646aeb5115e6bf686a39733a3f7207d5f4d (patch)
tree760d09bc1bcebe81fb0ef352dde986d53e0166d3
parentc96d98e1e0d163b3bfaf2799e1a795dd487bef93 (diff)
downloadinit-dcd4d646aeb5115e6bf686a39733a3f7207d5f4d.tar.gz
out(): If quiet is specified, stop printing messages
-rw-r--r--rc.lib3
1 files changed, 2 insertions, 1 deletions
diff --git a/rc.lib b/rc.lib
index c224523..bff6f1f 100644
--- a/rc.lib
+++ b/rc.lib
@@ -33,8 +33,9 @@ log() {
out() {
- printf '%b%s \033[39m%s\033[m\n' "${3:-"\033[1;36m"}" "${2:-->}" "$1"
log "$1"
+ [ "$quiet" = 1 ] && return
+ printf '%b%s \033[39m%s\033[m\n' "${3:-"\033[1;36m"}" "${2:-->}" "$1"
}
err() { out "$1" "!>" "\033[1;31m" ;}