Define RRDTOOL_V from RRDTOOL, but only after RRDTOOL is defined.
Output the header showing witch command is run on stderr, not stdout.
}
function verbose_rrdtool {
- echo "$RRDTOOL_V" "$@"
+ echo "$RRDTOOL_V" "$@" >&2
"$RRDTOOL_V" "$@"
}
fi
}
-if [ -n "$VERBOSE" ] ; then
- RRDTOOL_V="$RRDTOOL"
- RRDTOOL=verbose_rrdtool
-fi
-
if [ -z "$RRDTOOL" ] ; then
RRDTOOL=$TOP_BUILDDIR/src/rrdtool
RRDCACHED=$TOP_BUILDDIR/src/rrdcached
run_cached "$STANDARD_RRDCACHED"
fi
fi
+
+if [ -n "$VERBOSE" ] ; then
+ RRDTOOL_V="$RRDTOOL"
+ RRDTOOL=verbose_rrdtool
+fi