summaryrefslogtreecommitdiff
path: root/docs/rebuild
blob: 114ea9b2a7ca8ca17aba916c07b5232590c0975c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/sh

here=`pwd`
parent=`dirname $here`
echo "Adding $parent to \$PYTHONPATH"
export PYTHONPATH=$parent:$PYTHONPATH
DEPLOY_BASE="/home/paste/Paste-Deploy"

NORMAL="DeveloperGuidelines Paste StyleGuide index web/index \
        what-is-paste testing-applications url-parsing-with-wsgi \
        roadmap web/community/mailing-list
        web/community/repository web/community/index
        web/download/index web/package_index"
DOCTEST_BUILD="blog-tutorial TodoTutorial"

for NAME in $NORMAL ; do
    if [ -e "$NAME.html" -a ! "$NAME.html" -ot "$NAME.txt" ] ; then
	echo "$NAME is up to date."
	continue
    fi
    echo "Building $NAME."
    rst2html.py --cloak-email-addresses --no-toc-backlinks "$NAME.txt" > "$NAME.html"
done

for NAME in $DOCTEST_BUILD ; do
    if [ -e "$NAME.html" -a ! "$NAME.html" -ot "$NAME.txt" ] ; then
	echo "$NAME is up to date."
	continue
    fi
    echo "Building $NAME."
    python2.4 ../paste/tests/doctest_webapp.py "$NAME.txt"
done

chmod +x web/index.html

cp include/reference_header.txt reference.txt
echo ":extracted: `date`" >> reference.txt
echo >> reference.txt
python2.4 ../paste/docsupport/extract.py paste >> reference.txt
rst2html.py reference.txt > reference.html

pushd $DEPLOY_BASE/docs/
./rebuild
popd

python2.4 ../paste/docsupport/gensite.py
chmod +x ~paste/htdocs/index.html