Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

root/branches/cherrypy-2.1/docs/book/build.sh

Revision 735 (checked in by dowski, 3 years ago)

Fix for #335.

Line 
1 #!/bin/bash
2 #
3 # build.sh
4 #
5 # Copyright (c) 2005, CherryPy Team (team@cherrypy.org)
6 # All rights reserved.
7 #
8 # Redistribution and use in source and binary forms, with or without modification,
9 # are permitted provided that the following conditions are met:
10 #
11 #     * Redistributions of source code must retain the above copyright notice,
12 #       this list of conditions and the following disclaimer.
13 #     * Redistributions in binary form must reproduce the above copyright notice,
14 #       this list of conditions and the following disclaimer in the documentation
15 #       and/or other materials provided with the distribution.
16 #     * Neither the name of CherryPy Team nor the names of its contributors
17 #       may be used to endorse or promote products derived from this software
18 #       without specific prior written permission.
19 #
20 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21 # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
24 # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26 # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27 # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28 # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 #
31 # Thanks to Antonio Cavedoni (aka verbosus)
32 # for this building script
33 #
34 # Version 0.2 : Got rid of the docbook directories, made them tarballs.
35 #               Added untarDocbook() function
36 # Version 0.1 : First release
37 #
38
39 DOCBOOK_BASE_PATH=../../tools/docbook/
40 DOCBOOK_DTD_DIRECTORY=docbook4.5
41 DOCBOOK_XSL_DIRECTORY=docbook-xsl-1.68.1
42
43 untarDocbook() {
44     current=`pwd`
45     cd $DOCBOOK_BASE_PATH
46     if [ ! -d $DOCBOOK_DTD_DIRECTORY ]
47         then
48         tar zxf docbook-4.5b1.tgz
49     fi
50    
51     if [ ! -d $DOCBOOK_XSL_DIRECTORY ]
52         then
53         tar zxf docbook-xsl-1.68.1.tar.gz
54     fi
55     cd "$current"
56 }
57
58 #
59 # Let's build the doc in one big file
60 #
61 rm -rf ./html
62 mkdir html
63 mkdir html/css
64 mkdir html/images
65 cp xml/*.gif html/images/
66 cp css/*.css html/css/
67 untarDocbook
68 cd xml
69 xsltproc \
70     --timing \
71     --xinclude \
72     --output ../html/index.html \
73     ../xsl/html.xsl \
74     cherrypy.xml
75 cd ..
76 #
77 # Let's chunk the doc in different files
78 #
79 rm -rf ./chunk
80 mkdir chunk
81 mkdir chunk/css
82 mkdir chunk/images
83 cp css/*.css chunk/css/
84 cp xml/*.gif chunk/images/
85 untarDocbook
86 cd xml
87 xsltproc \
88     --timing \
89     --xinclude \
90     --output ../chunk/index.html \
91     ../xsl/chunked.xsl \
92     cherrypy.xml
93 cd ..
94 exit
Note: See TracBrowser for help on using the browser.

Hosted by WebFaction

Log in as guest/cpguest to create tickets