summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2015-10-05 16:44:23 +0200
committerMatthias Beyer <mail@beyermatthias.de>2015-10-05 16:44:23 +0200
commit43139cfe501305ad176a4c2caebbd7b3da517187 (patch)
treee85c2eecaa19b3b7b08f6a975fc2d336101d4f22
parent0807a388a75abff8785be61efaeb31303b48ae86 (diff)
parent32ee12997d95854d17aadc39722b329854cff613 (diff)
Merge pull request #106 from matthiasbeyer/fix-verbosity_bugv0.3
Fix verbosity bug
-rwxr-xr-xnix-script-switch.sh2
-rw-r--r--nix-utils.sh15
2 files changed, 16 insertions, 1 deletions
diff --git a/nix-script-switch.sh b/nix-script-switch.sh
index 93d8d49..6d14122 100755
--- a/nix-script-switch.sh
+++ b/nix-script-switch.sh
@@ -170,7 +170,7 @@ dbg "ARGS = $ARGS"
[[ ! -d "$WD" ]] && stderr "No directory: $WD" && exit 1
-TAG_TARGET=$(__git "$WD" rev-parse HEAD)
+TAG_TARGET=$(__quiet__ __git "$WD" rev-parse HEAD)
stdout "Tag in config will be generated at '$TAG_TARGET'"
if [[ -z "$DONT_BUILD" ]]
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() {