shithub: pointless

Download patch

ref: f8396fb5c9652368e1722976df158f5c4ae8ab64
parent: 5ca9e05549445b6f3ddb8f73dba423a083bbbde3
author: Tevo <[email protected]>
date: Fri Nov 13 19:55:29 EST 2020

verbose

--- a/generate
+++ b/generate
@@ -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,13 +32,19 @@
 	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@\[email protected]@'}
@@ -40,8 +51,14 @@
 	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 ***'
+