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