new file mode 100755
@@ -0,0 +1,63 @@
+#!/bin/bash
+
+the_sed()
+{
+ sed -e 's|@DISTCONFDIR@|/TEST|g;s|@MODULE_DIRECTORY@|/TEST|g' $1
+}
+
+gen_xslt()
+{
+ #--output ${xml//.xml}.xslt \
+ #--noout \
+ for xml in *xml; do
+ the_sed $xml | xsltproc \
+ --stringparam man.output.quietly 1 \
+ --param funcsynopsis.style "'ansi'" \
+ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl -
+ # The output and noout args seems cosmetic, sigh
+ mv ${xml//.xml}{,.xslt}
+ done
+}
+
+gen_scdoc()
+{
+ for scd in *scd; do
+ the_sed $scd | scdoc > ${scd//.scd}.scdoc
+ done
+}
+
+comp_output()
+{
+ export LESS='-F -i -M -R -S -w -X -z-4'
+ unset MANPAGER
+
+ for xslt in $(ls --sort=version *xslt); do
+ _name=${xslt//.xslt}
+
+ echo "Checking $_name"
+
+ diff --unified --color=always \
+ <(man ./$_name.xslt) \
+ <(man ./$_name.scdoc) | less
+
+ read
+ done
+}
+
+comp_raw()
+{
+ for xslt in *xslt; do
+ _name=${xslt//.xslt}
+
+ diff --unified --color=always ./$_name.{xslt,scdoc}
+ done
+}
+
+time gen_xslt
+time gen_scdoc
+
+comp_output
+#comp_raw
+
+rm -f *xslt
+rm -f *scdoc