]>
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 | |
77d4f443 | 15 | |
1e4a197e | 16 | # **** Make a directory to build up a distribution tree |
1e4a197e RD |
17 | mkdir -p _build_docs/$DEST |
18 | cd _build_docs | |
19 | mkdir $DEST/wx | |
1e4a197e RD |
20 | |
21 | WXDIR=../.. | |
77d4f443 | 22 | INI=$WXDIR/docs/latex/wx/tex2rtf.ini |
1e4a197e | 23 | |
0a358773 RD |
24 | # **** Build the main docs using tex2rtf |
25 | echo "****" main "****" | |
1e4a197e | 26 | cp $WXDIR/docs/latex/wx/*.gif $DEST/wx |
947697fb | 27 | cp $WXDIR/docs/latex/wx/*.css $DEST/wx |
77d4f443 | 28 | tex2rtf $WXDIR/docs/latex/wx/manual.tex $DEST/wx/wx.html -twice -html -macros $INI |
ccc6783c | 29 | cp $DEST/wx/wx_contents.html $DEST/wx/index.html |
689b5c38 | 30 | cp $DEST/wx/* $WXDIR/docs/html/wx |
1e4a197e | 31 | |
0a358773 RD |
32 | # **** and the contribs |
33 | for 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 | |
77d4f443 | 38 | tex2rtf $WXDIR/contrib/docs/latex/$c/$c.tex $DEST/$c/$c.html -twice -html -macros $INI |
ccc6783c | 39 | cp $DEST/$c/$c.html $DEST/$c/index.html || cp $DEST/$c/${c}_contents.html $DEST/$c/index.html |
0a358773 | 40 | done |
1e4a197e RD |
41 | |
42 | ||
43 | # **** zip the docs into "books" | |
44 | pushd $DEST | |
45 | pushd wx | |
46 | zip ../wx.zip * | |
47 | popd | |
48 | rm -r wx | |
49 | ||
0a358773 RD |
50 | for c in $CONTRIBS; do |
51 | pushd $c | |
52 | zip ../$c.zip * | |
53 | popd | |
54 | rm -r $c | |
55 | done | |
1e4a197e RD |
56 | |
57 | popd | |
58 | cp ../distrib/viewdocs.py $DEST | |
59 | cp ../distrib/README.viewdocs.txt $DEST/README.txt | |
51ba037f | 60 | cp ../docs/xml/wxPython-metadata.xml $DEST |
1e4a197e | 61 | |
cb56afc4 RD |
62 | rm -f ../dist/wxPython-docs-$VERSION.tar.gz |
63 | tar cvf ../dist/wxPython-docs-$VERSION.tar $DEST | |
64 | gzip -9 ../dist/wxPython-docs-$VERSION.tar | |
1e4a197e RD |
65 | |
66 | ||
67 | # **** Cleanup | |
68 | cd .. | |
69 | rm -r _build_docs | |
70 | ||
71 |