Added XML Docbook documentation for YAZ - will eventually replace
[yaz-moved-to-github.git] / doc / indexdata.sh
1 #!/bin/sh
2 # $Id: indexdata.sh,v 1.3 2000-03-29 15:23:55 adam Exp $
3 # Script to convert documentation to indexdata.dk style...
4 package=$1
5 for i in ${package}*.html; do
6         j=`basename $i html`php
7         awk -v PACKAGE=\"${package}\" 'BEGIN { body = 0 } /<\/BODY/ { body = 0; print "<?php id_footer(); ?>" } { if (body == 1) print $0} /<BODY>/ { body = 1; print "<?php require(\"../id_common.inc\"); id_header(", PACKAGE, "); ?>"; }' < $i | sed "-es/\(HREF=\"${package}.*\)\.html/\1.php/g"  >$j
8 done