1#!/bin/sh
2
3output=$1
4filter=$2
5testlist=$3
6
7echo "<?xml version=\"1.0\"?>" > $output
8echo "<!DOCTYPE refsect1 PUBLIC \"-//OASIS//DTD DocBook XML V4.3//EN\"" >> $output
9echo "               \"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd\"" >> $output
10echo "[" >> $output
11echo "  <!ENTITY % local.common.attrib \"xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'\">" >> $output
12echo "  <!ENTITY version SYSTEM \"version.xml\">" >> $output
13echo "]>" >> $output
14echo "<refsect1>" >> $output
15echo "<title>Programs</title>" >> $output
16echo "<informaltable pgwide=\"1\" frame=\"none\"><tgroup cols=\"2\"><tbody>" >> $output
17for test in `cat $testlist | tr ' ' '\n' | grep "^$filter" | sort`; do
18	echo "<row><entry role=\"program_name\">" >> $output;
19	echo "<link linkend=\"$test\">$test</link></entry></row>" >> $output;
20done;
21echo "</tbody></tgroup></informaltable>" >> $output
22echo "</refsect1>" >> $output
23