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

root/branches/cherrypy-2.x/docs/book/build4xslt.sh

Revision 506 (checked in by lawouach, 3 years ago)

fixed stylesheets to make sure the css is declared in the HTML output

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
32 DOCBOOK_BASE_PATH=../../tools/docbook/
33 DOCBOOK_DTD_DIRECTORY=docbook4.5
34 DOCBOOK_XSL_DIRECTORY=docbook-xsl-1.68.1
35
36 untarDocbook() {
37     current=`pwd`
38     cd $DOCBOOK_BASE_PATH
39     if [ ! -d $DOCBOOK_DTD_DIRECTORY ]
40         then
41         tar zxf docbook-4.5b1.tgz
42     fi
43    
44     if [ ! -d $DOCBOOK_XSL_DIRECTORY ]
45         then
46         tar zxf docbook-xsl-1.68.1.tar.gz
47     fi
48     cd "$current"
49 }
50
51 #
52 # Let's build the doc in one big file
53 #
54 rm -rf ./html
55 mkdir html
56 mkdir html/css
57 cp css/*.css html/css/
58 untarDocbook
59 4xslt --outfile=html/index.html xml/cherrypy.xml xsl/html.xsl $DOCBOOK_BASE_PATH$DOCBOOK_XSL_DIRECTORY/html/docbook.xsl
60  
61 #
62 # Let's chunk the doc in different files
63 #
64 rm -rf ./chunk
65 mkdir chunk
66 mkdir chunk/css
67 cp css/*.css chunk/css/
68 untarDocbook
69 4xslt --outfile=chunk/index.html xml/cherrypy.xml xsl/chunked.xsl $DOCBOOK_BASE_PATH$DOCBOOK_XSL_DIRECTORY/html/docbook.xsl
70
71 exit
Note: See TracBrowser for help on using the browser.

Hosted by WebFaction

Log in as guest/cpguest to create tickets