]> git.saurik.com Git - wxWidgets.git/blame - wxPython/distrib/makedocs
update from Tsolakos Stavros
[wxWidgets.git] / wxPython / distrib / makedocs
CommitLineData
1e4a197e
RD
1#!/bin/bash
2
3#----------------------------------------------------------------------
4
5if [ -z $1 ]; then
6 echo "Please specify a version number on the command line."
7 exit 1
8fi
9
10if [ ! -d wxPython ]; then # TODO: make this test more robust
11 echo "Please run this script from the root wxPython directory."
12 exit 1
13fi
14
15
0a358773
RD
16CONTRIBS="ogl gizmos"
17
1e4a197e
RD
18# **** Make a directory to build up a distribution tree
19
20DEST=wxPython-$1/docs
21
22mkdir -p _build_docs/$DEST
23cd _build_docs
24mkdir $DEST/wx
1e4a197e
RD
25
26WXDIR=../..
27
0a358773
RD
28# **** Build the main docs using tex2rtf
29echo "****" main "****"
1e4a197e 30cp $WXDIR/docs/latex/wx/*.gif $DEST/wx
0a358773 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
1e4a197e
RD
32cp $DEST/wx/wx.htm $DEST/wx/index.htm
33
0a358773
RD
34# **** and the contribs
35for 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
42done
1e4a197e
RD
43
44
45# **** zip the docs into "books"
46pushd $DEST
47pushd wx
48zip ../wx.zip *
49popd
50rm -r wx
51
0a358773
RD
52for c in $CONTRIBS; do
53 pushd $c
54 zip ../$c.zip *
55 popd
56 rm -r $c
57done
1e4a197e
RD
58
59popd
60cp ../distrib/viewdocs.py $DEST
61cp ../distrib/README.viewdocs.txt $DEST/README.txt
62
63rm -f ../dist/wxPythonDocs-$1.tar.gz
64tar cvf ../dist/wxPythonDocs-$1.tar $DEST
65gzip -9 ../dist/wxPythonDocs-$1.tar
66
67
68# **** Cleanup
69cd ..
70rm -r _build_docs
71
72