Output to stderr. Read from stdin if no arguments given, making it
possible to handle long lines using here documents.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
######################################################################
if "$TEST_VERBOSE" ; then
- debug () { echo "$@" ; }
+ debug ()
+ {
+ if [ -n "$1" ] ; then
+ echo "$@" >&2
+ else
+ cat >&2
+ fi
+ }
else
- debug () { : ; }
+ debug () { : ; }
fi
######################################################################