summaryrefslogtreecommitdiffstats
path: root/imag-store
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2016-02-04 18:15:40 +0100
committerMatthias Beyer <mail@beyermatthias.de>2016-02-09 13:48:14 +0100
commit6ec57c0bde522ec225859201bf8d097f6eed04c7 (patch)
tree0b24e7aa0a6f6f2bdd801f8ad36cbf719f79ab20 /imag-store
parentef8c364ef139a05a7ec6fefe4f61d181c51fd4c6 (diff)
Add silent() helper for calling without debugging output
Diffstat (limited to 'imag-store')
-rw-r--r--imag-store/tests/utils.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/imag-store/tests/utils.sh b/imag-store/tests/utils.sh
index 7f12cb55..148eaf87 100644
--- a/imag-store/tests/utils.sh
+++ b/imag-store/tests/utils.sh
@@ -9,15 +9,19 @@ RUNTIME="/tmp"
STORE="${RUNTIME}/store"
out() {
- echo -e "${YELLOW}:: $*${COLOR_OFF}"
+ [[ -z "$DEBUG_OUTPUT_OFF" ]] && echo -e "${YELLOW}:: $*${COLOR_OFF}"
}
success() {
- echo -e "${GREEN}>> $*${COLOR_OFF}"
+ [[ -z "$DEBUG_OUTPUT_OFF" ]] && echo -e "${GREEN}>> $*${COLOR_OFF}"
}
err() {
- echo -e "${RED}!! $*${COLOR_OFF}"
+ [[ -z "$DEBUG_OUTPUT_OFF" ]] && echo -e "${RED}!! $*${COLOR_OFF}"
+}
+
+silent() {
+ DEBUG_OUTPUT_OFF=1 $*
}
imag-store() {