shithub: pointless

Download patch

ref: f8396fb5c9652368e1722976df158f5c4ae8ab64
parent: 5ca9e05549445b6f3ddb8f73dba423a083bbbde3
author: Tevo <estevan.cps@gmail.com>
date: Fri Nov 13 19:55:29 EST 2020

verbose

--- a/generate	Sun Nov  8 22:01:35 2020
+++ b/generate	Fri Nov 13 19:55:29 2020
@@ -7,8 +7,13 @@
 	exit usage
 }
 
+fn verbose {
+	if(! ~ $#flagv 0)
+		echo $*
+}
+
 args='dir'
-flagfmt='o:outdir outdir'
+flagfmt='v, o:outdir outdir'
 
 if(! eval `{aux/getflags $*})
 	usage
@@ -27,21 +32,33 @@
 	pointlessroot=`{pwd}
 }
 
+verbose '*** executing pre-generation hooks ***'
+
 for(index in `{walk $outdir | grep 'index\.rc$'}) @{
+	verbose --- $index ---
 	cd `{basename -d $index}
 	. index.rc
 	rm index.rc
 }
 
+verbose '*** preprocessing templates ***'
+
 for(ptless in `{walk $outdir | grep '\.ptless$'}) @{
+	verbose --- $ptless ---
 	cd `{basename -d $ptless}
 	ptless=`{basename $ptless}
 	pointless/pointless.awk $ptless >`{echo $ptless | sed 's@\.ptless$@.html@'}
 	rm $ptless
 }
 
+verbose '*** executing post-generation hooks ***'
+
 for(epilogue in `{walk $outdir | grep 'epilogue\.rc$'}) @{
+	verbose --- $epilogue ---
 	cd `{basename -d $epilogue}
 	. epilogue.rc
 	rm epilogue.rc
 }
+
+verbose '*** finished ***'
+