Updated for 2.1a3
[python/dscho.git] / Doc / tools / update-docs.sh
blobb3b48ba8c361f03961275b374297423b9560c0ee
1 #! /bin/sh
3 # Script which determines if a new development snapshot of the
4 # documentation is available, and unpacks it into the "Python @
5 # SourceForge" website.
7 # A copy of this script is run periodically via cron.
9 if [ -z "$HOME" ] ; then
10 HOME=`grep fdrake /etc/passwd | sed 's|^.*:\([^:]*\):[^:]*$|\1|'`
11 export HOME
14 UPDATES=$HOME/python-docs-update.tar.bz2
15 INFO=$HOME/python-docs-update.txt
17 if [ -f "$UPDATES" ] ; then
18 cd /home/groups/python/htdocs
19 rm -rf devel-docs || exit $?
20 mkdir devel-docs || exit $?
21 cd devel-docs || exit $?
22 (bzip2 -dc "$UPDATES" | tar xf -) || exit $?
23 rm "$UPDATES" || exit $?
24 if [ -f "$INFO" ] ; then
25 EXPLANATION="`cat $INFO`"
26 else
27 EXPLANATION=''
29 Mail -s '[development doc updates]' \
30 python-dev@python.org doc-sig@python.org \
31 <<EOF
32 The development version of the documentation has been updated:
34 http://python.sourceforge.net/devel-docs/
36 $EXPLANATION
37 EOF
38 rm -f $HOME/python-docs-update.txt