summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2015-10-05 16:41:05 +0200
committerMatthias Beyer <mail@beyermatthias.de>2015-10-05 16:43:15 +0200
commit1fdbea527602ffe584fe824cb460afbc44f72396 (patch)
treeebfefb2e836d93b537c783b3052ba1969ab3a2b4
parent0807a388a75abff8785be61efaeb31303b48ae86 (diff)
util: Provide functions to disable output
-rw-r--r--nix-utils.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/nix-utils.sh b/nix-utils.sh
index a34a2ee..de1f76f 100644
--- a/nix-utils.sh
+++ b/nix-utils.sh
@@ -6,6 +6,21 @@ Yellow='\e[0;33m'
Green='\e[0;32m'
#
+# Do something explicitely without verbosity output
+#
+__quiet__() {
+ VERBOSE=0 $*
+}
+
+#
+# Do something explicitely without debug and verbosity output (with no output at
+# all therefor)
+#
+__silent__() {
+ DEBUG=0 __quiet__ $*
+}
+
+#
# Check whether a string (2nd arg) contains a substring (1st arg)
#
stringcontains() {