diff options
author | William Jon McCann <mccann@jhu.edu> | 2007-03-13 03:42:04 -0400 |
---|---|---|
committer | William Jon McCann <mccann@jhu.edu> | 2007-03-13 03:42:04 -0400 |
commit | 8b42a4928a0a266c3b3ae6bb13997764bc7f6405 (patch) | |
tree | b1b1f06fdd18da4475c0dd773df364be3a0c9be0 /doc/tools/spec-to-docbook | |
parent | 4595ab3d4953d6257a6fedfe5b294df67ff3581f (diff) |
add the last bits of spec framework
The spec is the introspection format extended with
docs. There are tools to build docbook and strip
the docs to make dbus introspect xml.
Diffstat (limited to 'doc/tools/spec-to-docbook')
-rwxr-xr-x | doc/tools/spec-to-docbook | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/doc/tools/spec-to-docbook b/doc/tools/spec-to-docbook new file mode 100755 index 0000000..883e2ba --- /dev/null +++ b/doc/tools/spec-to-docbook @@ -0,0 +1,34 @@ +#!/bin/sh + +DIST_BIN=`dirname "$0"` + +CMD=xsltproc +XSL=${DIST_BIN}/spec-to-docbook.xsl + +if test "x$1" = "x" -o "x$1" = "x-h" -o "x$1" = "x--help"; then + echo "usage: $0 [file] ..." + exit 1 +fi + +if [ ! -r ${XSL} ]; then + echo "Cannot find XSLT file" + exit 1 +fi + +FILES="$@" +for FILE in $FILES; do + echo "${FILE}" | grep ".xml$" > /dev/null + if [ $? -ne 0 ]; then + echo "Skipping non-xml file: ${FILE}" + continue + fi + + d=`dirname ${FILE}` + b=`basename ${FILE} .xml` + + outfile="ref-${b}.xml" + echo "Creating: ${outfile}" + ${CMD} ${XSL} ${FILE} | tail -n +2 > ${outfile} +done + +exit 0 |