summaryrefslogtreecommitdiff
path: root/Doc/tools/update-docs.sh
blob: 53b6fc5197abe396f65c05f4731aa63cb4724514 (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
#! /bin/sh

#  Script which determines if a new development snapshot of the
#  documentation is available, and unpacks it into the "Python @
#  SourceForge" website.
#
#  A copy of this script is run periodically via cron.

if [ -z "$HOME" ] ; then
    HOME=`grep fdrake /etc/passwd | sed 's|^.*:\([^:]*\):[^:]*$|\1|'`
    export HOME
fi

UPDATES=/home/users/fdrake/python-docs-update.tar.bz2

if [ -f "$UPDATES" ] ; then
    cd /home/groups/python/htdocs
    rm -rf devel-docs || exit $?
    mkdir devel-docs || exit $?
    cd devel-docs || exit $?
    (bzip2 -dc "$UPDATES" | tar xf -) || exit $?
    rm "$UPDATES" || exit $?
    Mail -s '[online doc updates]' fdrake@acm.org <<EOF
Development version of documentation updated:
http://python.sourceforge.net/devel-docs/
EOF
fi