]> git.saurik.com Git - wxWidgets.git/blame_incremental - wxPython/distrib/makedocs
make sure the dist dir is created
[wxWidgets.git] / wxPython / distrib / makedocs
... / ...
CommitLineData
1#!/bin/bash
2
3#----------------------------------------------------------------------
4
5if [ ! -d wxPython ]; then # TODO: make this test more robust
6 echo "Please run this script from the root wxPython directory."
7 exit 1
8fi
9
10
11VERSION=`python -c "import setup;print setup.VERSION"`
12CONTRIBS="ogl gizmos"
13DEST=wxPython-$VERSION/docs
14
15
16# **** Make a directory to build up a distribution tree
17mkdir -p _build_docs/$DEST
18cd _build_docs
19mkdir $DEST/wx
20
21WXDIR=../..
22INI=$WXDIR/docs/latex/wx/tex2rtf.ini
23
24# **** Build the main docs using tex2rtf
25echo "****" main "****"
26cp $WXDIR/docs/latex/wx/*.gif $DEST/wx
27cp $WXDIR/docs/latex/wx/*.css $DEST/wx
28tex2rtf $WXDIR/docs/latex/wx/manual.tex $DEST/wx/wx.html -twice -html -macros $INI
29cp $DEST/wx/wx_contents.html $DEST/wx/index.html
30cp $DEST/wx/* $WXDIR/docs/html/wx
31
32# **** and the contribs
33for c in $CONTRIBS; do
34 echo "****" $c "****"
35 mkdir $DEST/$c
36 cp $WXDIR/contrib/docs/latex/$c/*.gif $DEST/$c
37 cp $WXDIR/contrib/docs/latex/$c/*.bmp $DEST/$c
38 tex2rtf $WXDIR/contrib/docs/latex/$c/$c.tex $DEST/$c/$c.html -twice -html -macros $INI
39 cp $DEST/$c/$c.html $DEST/$c/index.html || cp $DEST/$c/${c}_contents.html $DEST/$c/index.html
40done
41
42
43# **** zip the docs into "books"
44pushd $DEST
45pushd wx
46zip ../wx.zip *
47popd
48rm -r wx
49
50for c in $CONTRIBS; do
51 pushd $c
52 zip ../$c.zip *
53 popd
54 rm -r $c
55done
56
57popd
58cp ../distrib/viewdocs.py $DEST
59cp ../distrib/README.viewdocs.txt $DEST/README.txt
60cp ../docs/xml/wxPython-metadata.xml $DEST
61
62rm -f ../dist/wxPythonDocs-$VERSION.tar.gz
63tar cvf ../dist/wxPythonDocs-$VERSION.tar $DEST
64gzip -9 ../dist/wxPythonDocs-$VERSION.tar
65
66
67# **** Cleanup
68cd ..
69rm -r _build_docs
70
71