File: generate_programs_xml.sh

package info (click to toggle)
intel-gpu-tools 2.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 64,504 kB
  • sloc: xml: 781,458; ansic: 378,272; python: 8,407; yacc: 2,781; perl: 1,196; sh: 1,177; lex: 487; asm: 227; lisp: 35; makefile: 30
file content (22 lines) | stat: -rwxr-xr-x 920 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

output=$1
filter=$2
testlist=$3

echo "<?xml version=\"1.0\"?>" > $output
echo "<!DOCTYPE refsect1 PUBLIC \"-//OASIS//DTD DocBook XML V4.3//EN\"" >> $output
echo "               \"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd\"" >> $output
echo "[" >> $output
echo "  <!ENTITY % local.common.attrib \"xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'\">" >> $output
echo "  <!ENTITY version SYSTEM \"version.xml\">" >> $output
echo "]>" >> $output
echo "<refsect1>" >> $output
echo "<title>Programs</title>" >> $output
echo "<informaltable pgwide=\"1\" frame=\"none\"><tgroup cols=\"2\"><tbody>" >> $output
for test in `cat $testlist | tr ' ' '\n' | grep "^$filter" | sort`; do
	echo "<row><entry role=\"program_name\">" >> $output;
	echo "<link linkend=\"$test\">$test</link></entry></row>" >> $output;
done;
echo "</tbody></tgroup></informaltable>" >> $output
echo "</refsect1>" >> $output