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