OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [net/] [ipsec/] [libipsec/] [current/] [doc/] [prepare-manpages.sh] - Blame information for rev 786

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
#! /bin/sh
2
 
3
echo 'dude, assuming you are running this script from the packages/net/ipsec/libipsec/<version>/docs/ directory'
4
 
5
MANPAGE_LIST=`find manpages -type f -name '*.?'`
6
 
7
echo "MANPAGE_LIST is $MANPAGE_LIST"
8
 
9
echo 'removing the previous file libipsec-manpages.sgml'
10
/bin/rm -f libipsec-manpages.sgml
11
touch libipsec-manpages.sgml
12
echo '<!-- HEY YOU!!!!!!!!! -->' >> libipsec-manpages.sgml
13
echo '<!-- this file is automatically generated by the script -->' >> libipsec-manpages.sgml
14
echo '<!-- ' "     $0    " ' -->' >> libipsec-manpages.sgml
15
echo '<!-- so PLEASE do not modify it: your changes will be lost -->' >> libipsec-manpages.sgml
16
echo >> libipsec-manpages.sgml
17
echo >> libipsec-manpages.sgml
18
 
19
echo "<chapter id=\"libipsec-library-reference\">" >> libipsec-manpages.sgml
20
echo "  <title>libipsec Reference</title>" >> libipsec-manpages.sgml
21
 
22
echo >> libipsec-manpages.sgml
23
echo >> libipsec-manpages.sgml
24
 
25
for manpage in $MANPAGE_LIST
26
do
27
    echo "processing $manpage"
28
    # get the title for this section
29
    manpage_title=`egrep '^\.Dt' $manpage | awk '{print $2}' | tr 'A-Z' 'a-z'`
30
    # note that _ is illegal in an id, so we canonicalize it to -
31
    docbook_section_id=`echo $manpage_title | sed 's/_/-/g'`
32
    # now prepare out a section and title
33
    echo "  <sect1 id=\"net-ipsec-libipsec-man-$docbook_section_id\">" >> libipsec-manpages.sgml
34
    echo "    <title>$manpage_title</title>" >> libipsec-manpages.sgml
35
    # we make it <screen> so that it is a monospaced font
36
    echo "    <screen>" >> libipsec-manpages.sgml
37
 
38
    # now put the contents into this section
39
    cat $manpage | groff -Tascii -mandoc | sed 's/\_\(.\)/\1/g' \
40
      | sed 's/\(.\)\(.\)/\1/g' \
41
      | sed 's/\&/\&amp;/g' \
42
      | sed 's/</\&lt;/g' \
43
      | sed 's/+o/o/g' >> libipsec-manpages.sgml
44
 
45
    # now close out the section
46
    echo "    </screen>" >> libipsec-manpages.sgml
47
    echo "  </sect1>" >> libipsec-manpages.sgml
48
    echo >> libipsec-manpages.sgml
49
done
50
 
51
echo >> libipsec-manpages.sgml
52
echo "</chapter>" >> libipsec-manpages.sgml
53
 
54
cat <<EOF >> libipsec-manpages.sgml
55
 
56
<!-- Keep this comment at the end of the file
57
Local variables:
58
mode: sgml
59
sgml-omittag:nil
60
sgml-shorttag:t
61
sgml-namecase-general:t
62
sgml-general-insert-case:lower
63
sgml-minimize-attributes:nil
64
sgml-always-quote-attributes:t
65
sgml-indent-step:2
66
sgml-indent-data:t
67
sgml-parent-document:("ipsec.sgml" "book" "chapter")
68
sgml-exposed-tags:nil
69
sgml-local-catalogs:nil
70
sgml-local-ecat-files:nil
71
sgml-doctype:"book"
72
End:
73
-->
74
 
75
EOF

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.