aboutsummaryrefslogtreecommitdiff
path: root/utils/echo
diff options
context:
space:
mode:
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
}