3 # quick and dirty - might break anytime if docbook html output changes
4 function docbook_html_to_drupal () {
9 mkdir -p $(dirname $php)
10 if [ ! -f $html ] ; then
11 cat << __header_no_doc__ > $php
13 require_once 'plc_drupal.php';
14 drupal_set_title("$title - unavailable");
16 <p class='plc-warning'> Build-time error - could not locate documentation $html</p>
19 # insert header, makes sure we have a trailing eol
20 (cat << __header_doc__ ; cat $html ) > $php
22 require_once 'plc_drupal.php';
23 drupal_set_title("$title");
26 # ignore ed return status
28 # cuts off around the <body> </body>
29 # preserves the 4 first lines that we just added as a header
30 ed -s $php << __ed_script__
47 docbook_html_to_drupal "$@"