Project

General

Profile

« Previous | Next » 

Revision 8911

lib/util.sh: added log_stderr_cmd ()

View differences:

util.sh
70 70
# `|| exit` needed on Mac because of bug where -e doesn't apply to ()
71 71
log_stderr () { if ! can_log; then exec 2>/dev/null; fi; }
72 72

  
73
log_stderr_cmd () { (log_stderr; "$@") || exit; } # usage: log_stderr_cmd cmd...
74

  
73 75
echo_cmd () { if can_log; then echo "$PS4$*" >&2; fi; }
74 76

  
75 77
echo_run () { echo_cmd "$@"; "$@"; }

Also available in: Unified diff