Rather than setting things up for a verbose build and then changing
things later.
## diag -- null (verbose), or logfile (quiet); primary diagnostic output
## term -- orginal stderr; secondary diagnostic output (with colours)
-exec {log}>&2 {diag}>/dev/null {term}>&2
-
notify () {
colour=$1 message=$2
echo $message >&$diag
chmod -R +w $releasepath 2>/dev/null || :
rm -rf $releasepath 2>/dev/null || :
mkdir $releasepath
+exec {term}>&2
case $verbose in
no)
- exec {log}>&- {diag}>&-
exec {diag}>$releasepath/mdw-build.log {log}>&$diag ||
fail "Failed to create log."
;;
+ yes)
+ exec {diag}>/dev/null {log}>&2
+ ;;
esac
## Repeat the earlier assignments for tbe benefit of the logfile.