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