blob: b3b48ba8c361f03961275b374297423b9560c0ee [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 Drakee4f1c322001-02-14 21:26:31 +000024 if [ -f "$INFO" ] ; then
25 EXPLANATION="`cat $INFO`"
26 else
27 EXPLANATION=''
28 fi
Fred Draked34cfcb2000-10-29 13:21:45 +000029 Mail -s '[development doc updates]' \
30 python-dev@python.org doc-sig@python.org \
31 <<EOF
32The development version of the documentation has been updated:
33
34 http://python.sourceforge.net/devel-docs/
Fred Drake827bb9f2000-11-30 07:38:59 +000035
36$EXPLANATION
Fred Drake692565c2000-10-19 05:54:51 +000037EOF
Fred Drake827bb9f2000-11-30 07:38:59 +000038 rm -f $HOME/python-docs-update.txt
Fred Drake692565c2000-10-19 05:54:51 +000039fi