1 | #####
|
---|
2 | #
|
---|
3 | # Parse the XML documents to create a 'package' book
|
---|
4 | #
|
---|
5 | # $Id:
|
---|
6 | #####
|
---|
7 |
|
---|
8 |
|
---|
9 | #----------------------------#
|
---|
10 | generate_TARGET_xml() { #
|
---|
11 | #----------------------------#
|
---|
12 | : <<inline_doc
|
---|
13 | function: Generate the XML document for the TARGET package
|
---|
14 | input vars: nothing
|
---|
15 | externals: vars: TARGET
|
---|
16 | modifies: nothing
|
---|
17 | returns: nothing
|
---|
18 | output: file: $TARGET-index.xml
|
---|
19 | on error: nothing
|
---|
20 | on success: nothing
|
---|
21 | inline_doc
|
---|
22 |
|
---|
23 | local
|
---|
24 | echo -en "\tGenerating $TARGET-index.xml ..."
|
---|
25 |
|
---|
26 | #---------------------
|
---|
27 | # Header to $TARGET-index.xml
|
---|
28 | {
|
---|
29 | cat << EOF
|
---|
30 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
31 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
---|
32 | "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" >
|
---|
33 |
|
---|
34 | <book>
|
---|
35 |
|
---|
36 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../$BLFS_XML/book/bookinfo.xml"/>
|
---|
37 |
|
---|
38 | <preface>
|
---|
39 | <?dbhtml filename="preface.html" dir="preface"?>
|
---|
40 |
|
---|
41 | <title>Preface</title>
|
---|
42 |
|
---|
43 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../$BLFS_XML/introduction/important/locale-issues.xml"/>
|
---|
44 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../$BLFS_XML/introduction/important/bootscripts.xml"/>
|
---|
45 |
|
---|
46 | </preface>
|
---|
47 |
|
---|
48 | <chapter>
|
---|
49 | <?dbhtml filename="chapter.html" dir="installing"?>
|
---|
50 |
|
---|
51 | <title>Installing $TARGET in Dependencies Build Order</title>
|
---|
52 |
|
---|
53 | EOF
|
---|
54 | } > $TARGET-index.xml
|
---|
55 |
|
---|
56 | #---------------------
|
---|
57 | # Dump $TARGET-index.xml.tmp in reverse order.
|
---|
58 | tac $TARGET-index.xml.tmp >> $TARGET-index.xml
|
---|
59 | rm $TARGET-index.xml.tmp
|
---|
60 |
|
---|
61 | #---------------------
|
---|
62 | # Footer of $TARGET-index.xml
|
---|
63 | {
|
---|
64 | cat << EOF
|
---|
65 |
|
---|
66 | </chapter>
|
---|
67 |
|
---|
68 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../$BLFS_XML/appendices/creat-comm.xml"/>
|
---|
69 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../$BLFS_XML/appendices/ac-free-lic.xml"/>
|
---|
70 |
|
---|
71 | <index/>
|
---|
72 |
|
---|
73 | </book>
|
---|
74 |
|
---|
75 | EOF
|
---|
76 | } >> $TARGET-index.xml
|
---|
77 |
|
---|
78 | echo "done"
|
---|
79 | }
|
---|
80 |
|
---|
81 |
|
---|
82 | #-------------------------#
|
---|
83 | generate_target_book() { #
|
---|
84 | #-------------------------#
|
---|
85 | : <<inline_doc
|
---|
86 | function: Create an HTML document of the requested TARGET.
|
---|
87 | input vars: nothing
|
---|
88 | externals: vars: TARGET
|
---|
89 | BLFS_XML
|
---|
90 | modifies: nothing
|
---|
91 | returns: nothing
|
---|
92 | output: file: NUMEROUS FILES
|
---|
93 | on error: nothing
|
---|
94 | on success: nothing
|
---|
95 | inline_doc
|
---|
96 |
|
---|
97 | local filename # output filename
|
---|
98 |
|
---|
99 | echo -en "\tGenerating the HTML book ..."
|
---|
100 | xsltproc --xinclude --nonet --stringparam base.dir HTML/ \
|
---|
101 | --stringparam chunk.quietly 1 \
|
---|
102 | ../$BLFS_XML/stylesheets/blfs-chunked.xsl \
|
---|
103 | $TARGET-index.xml > xsltproc.log 2>&1
|
---|
104 |
|
---|
105 | mkdir HTML/{stylesheets,images}
|
---|
106 | cp ../$BLFS_XML/stylesheets/*.css HTML/stylesheets
|
---|
107 | cp ../$BLFS_XML/images/*.png HTML/images
|
---|
108 | cd HTML
|
---|
109 | sed -i -e "s@../stylesheets@stylesheets@g" *.html
|
---|
110 | sed -i -e "s@../images@images@g" *.html
|
---|
111 | for filename in `find . -name "*.html"` ; do
|
---|
112 | tidy -config ../../$BLFS_XML/tidy.conf $filename || true
|
---|
113 | sh ../../$BLFS_XML/obfuscate.sh $filename
|
---|
114 | sed -i -e "s@text/html@application/xhtml+xml@g" $filename
|
---|
115 | done
|
---|
116 | echo "done"
|
---|
117 | }
|
---|
118 |
|
---|
119 |
|
---|
120 | #-------------------------#
|
---|
121 | create_build_scripts() { #
|
---|
122 | #-------------------------#
|
---|
123 | : <<inline_doc
|
---|
124 | function:
|
---|
125 | input vars: nothing
|
---|
126 | externals: none
|
---|
127 | modifies: nothing
|
---|
128 | returns: nothing
|
---|
129 | output: none
|
---|
130 | on error: nothing
|
---|
131 | on success: nothing
|
---|
132 | inline_doc
|
---|
133 |
|
---|
134 | echo -en "\tGenerating the build scripts ... not implemented yet, sorry\n"
|
---|
135 | }
|
---|