diff options
Diffstat (limited to 'libtecla-1.6.1/update_html')
-rwxr-xr-x | libtecla-1.6.1/update_html | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/libtecla-1.6.1/update_html b/libtecla-1.6.1/update_html new file mode 100755 index 0000000..70f189e --- /dev/null +++ b/libtecla-1.6.1/update_html @@ -0,0 +1,37 @@ +#!/bin/sh + +# Convert man pages to html files. + +for dir in man/prog man/libr man/func man/misc man/file; do + for template in $dir/*.in;do + page=`basename "$template" .in` + if [ `wc -l < $template` -gt 1 ]; then + html="html/$page.html" + man2html $template > $html + for ref in libtecla cpl_complete_word ef_expand_file gl_get_line pca_lookup_file enhance gl_io_mode tecla; do + link="$ref.html" + ed -s $html << EOF + %s|$ref[(][^)][^) ]*[)]|<a href="$link"><b>$ref</b></a>|g + w + q +EOF + done + fi + done +done + +# Convert the change log into a web page. + +cd html +echo '<html><head><title>The tecla library change log</title></head>' > changes.html +echo '<body bgcolor="#add8e6"><pre>' >> changes.html +sed 's/&/&/g; s/</\</g; s/>/\>/g' ../CHANGES >> changes.html +echo '</pre></body></html>' >> changes.html + +# Do the same to the release-notes file. + +cd ../html +echo '<html><head><title>The tecla library release notes</title></head>' > release.html +echo '<body bgcolor="#add8e6"><pre>' >> release.html +sed 's/&/&/g; s/</\</g' ../RELEASE.NOTES >> release.html +echo '</pre></body></html>' >> release.html |