blob: a996461c6ead5b846ce26c2f8bede0b6c7a1ab4c [file] [log] [blame]
Fred Drake692565c2000-10-19 05:54:51 +00001#! /bin/sh
2
3# Script which determines if a new development snapshot of the
4# documentation is available, and unpacks it into the "Python @
5# SourceForge" website.
6#
7# A copy of this script is run periodically via cron.
8
9if [ -z "$HOME" ] ; then
10 HOME=`grep fdrake /etc/passwd | sed 's|^.*:\([^:]*\):[^:]*$|\1|'`
11 export HOME
12fi
13
Fred Drake827bb9f2000-11-30 07:38:59 +000014UPDATES=$HOME/python-docs-update.tar.bz2
15INFO=$HOME/python-docs-update.txt
Fred Drake692565c2000-10-19 05:54:51 +000016
17if [ -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 $?
Fred Drake827bb9f2000-11-30 07:38:59 +000024 EXPLANATION="`cat $INFO`"
Fred Draked34cfcb2000-10-29 13:21:45 +000025 Mail -s '[development doc updates]' \
26 python-dev@python.org doc-sig@python.org \
27 <<EOF
28The development version of the documentation has been updated:
29
30 http://python.sourceforge.net/devel-docs/
Fred Drake827bb9f2000-11-30 07:38:59 +000031
32$EXPLANATION
Fred Drake692565c2000-10-19 05:54:51 +000033EOF
Fred Drake827bb9f2000-11-30 07:38:59 +000034 rm -f $HOME/python-docs-update.txt
Fred Drake692565c2000-10-19 05:54:51 +000035fi