Revision 8904
Added by Aaron Marcuse-Kubitza over 11 years ago
lib/util.sh | ||
---|---|---|
64 | 64 |
alias inc_log_level='declare verbosity="$verbosity"; let verbosity--' |
65 | 65 |
alias dec_log_level='declare verbosity="$verbosity"; let verbosity++' |
66 | 66 |
|
67 |
# usage: (log_stderr; cmd...) || exit |
|
68 |
# `|| exit` needed on Mac because of bug where -e doesn't apply to () |
|
69 |
log_stderr () { if ! can_log; then exec 2>/dev/null; fi; } |
|
70 |
|
|
67 | 71 |
echo_cmd () { if can_log; then echo "$PS4$*" >&2; fi; } |
68 | 72 |
|
69 | 73 |
echo_run () { echo_cmd "$@"; "$@"; } |
Also available in: Unified diff
lib/util.sh: added log_stderr ()