aboutsummaryrefslogtreecommitdiff
path: root/utils/echo
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2017-09-20 21:19:05 +0200
committerKarel Kočí <cynerd@email.cz>2017-09-20 21:22:36 +0200
commitf287ecedc78c0cc8fb485c5995b8d1cfae9f0fe8 (patch)
tree5025b33a8c3d4c69ad2b62e1169b669c56f712f9 /utils/echo
parent65f52ead41dc6df73671ddd3a8c6a2edecb6dfb3 (diff)
downloadmulticonfig-f287ecedc78c0cc8fb485c5995b8d1cfae9f0fe8.tar.gz
multiconfig-f287ecedc78c0cc8fb485c5995b8d1cfae9f0fe8.tar.bz2
multiconfig-f287ecedc78c0cc8fb485c5995b8d1cfae9f0fe8.zip
Commit current statecomplicated
Diffstat (limited to 'utils/echo')
-rw-r--r--utils/echo13
1 files changed, 7 insertions, 6 deletions
diff --git a/utils/echo b/utils/echo
index c936f63..eeb8fa9 100644
--- a/utils/echo
+++ b/utils/echo
@@ -5,21 +5,21 @@ ECHO_VERBOSE=0
echo_info() {
set +x
- [ $ECHO_VERBOSE -ge 0 ] || return
+ [ $ECHO_VERBOSE -ge 0 ] || return 0
echo -e "\e[1;34m$@\e[0m" >&2
[ $ECHO_VERBOSE -lt 3 ] || set -x
}
echo_warn() {
set +x
- [ $ECHO_VERBOSE -ge -1 ] || return
+ [ $ECHO_VERBOSE -ge -1 ] || return 0
echo -e "\e[1;33m$@\e[0m" >&2
[ $ECHO_VERBOSE -lt 3 ] || set -x
}
echo_error() {
set +x
- [ $ECHO_VERBOSE -ge -2 ] || return
+ [ $ECHO_VERBOSE -ge -2 ] || return 0
echo -e "\e[1;31m$@\e[0m" >&2
[ $ECHO_VERBOSE -lt 3 ] || set -x
}
@@ -31,20 +31,21 @@ echo_die() {
fi
[ $ECHO_VERBOSE -lt 3 ] || set -x
# Suicide
+ EXIT_CODE=2
kill $$
}
echo_dbg() {
set +x
- [ $ECHO_VERBOSE -ge 1 ] || return
+ [ $ECHO_VERBOSE -ge 1 ] || return 0
echo -e "\e[1;90m$@\e[0m" >&2
[ $ECHO_VERBOSE -lt 3 ] || set -x
}
echo_trace() {
set +x
- [ $ECHO_VERBOSE -ge 2 ] || return
- echo -e "\e[1;90m$@\e[0m" >&2
+ [ $ECHO_VERBOSE -ge 2 ] || return 0
+ echo -e "\e[0;90m$@\e[0m" >&2
[ $ECHO_VERBOSE -lt 3 ] || set -x
}