X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=docbook2drupal.sh;fp=docbook2drupal.sh;h=0000000000000000000000000000000000000000;hb=a5d97518c039f7b1a5a56593321ae660db9a970f;hp=10a32d85382e8d91c2fbe41e29677aa9477917fd;hpb=4d3eb0f230df155faa31ba74bd039cf539ac3db0;p=myplc.git diff --git a/docbook2drupal.sh b/docbook2drupal.sh deleted file mode 100755 index 10a32d8..0000000 --- a/docbook2drupal.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash - -# quick and dirty - might break anytime if docbook html output changes -function docbook_html_to_drupal () { - title=$1; shift - html=$1; shift - php=$1; shift - - mkdir -p $(dirname $php) - if [ ! -f $html ] ; then - cat << __header_no_doc__ > $php - -

Build-time error - could not locate documentation $html

-__header_no_doc__ - else - # insert header, makes sure we have a trailing eol - (cat << __header_doc__ ; cat $html ) > $php - -__header_doc__ - # ignore ed return status - set +e - # cuts off around the - # preserves the 4 first lines that we just added as a header - ed -s $php << __ed_script__ -/BODY/ -/>/ -s,><,<, -5,-d -$ -?/BODY? -s,><.*,>, -+ -;d -w -q -__ed_script__ - set -e - fi -} - -docbook_html_to_drupal "$@"