Project

General

Profile

« Previous | Next » 

Revision 8914

lib/util.sh: added stdout2stderr ()

View differences:

util.sh
57 57

  
58 58
#### verbose output
59 59

  
60
# usage: (stdout2stderr; cmd...) || exit
61
# `|| exit` needed on Mac because of bug where -e doesn't apply to ()
62
stdout2stderr () { exec >&2; }
63

  
60 64
: "${verbosity:=$verbose}" "${verbosity:=0}"
61 65

  
62 66
can_log () { test "$verbosity" -gt 0; } # verbosity=0 turns off all logging

Also available in: Unified diff