diff options
Diffstat (limited to 'utils/echo')
-rw-r--r-- | utils/echo | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -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 } |