Fred Drake | 692565c | 2000-10-19 05:54:51 +0000 | [diff] [blame^] | 1 | #! /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 | |
| 9 | if [ -z "$HOME" ] ; then |
| 10 | HOME=`grep fdrake /etc/passwd | sed 's|^.*:\([^:]*\):[^:]*$|\1|'` |
| 11 | export HOME |
| 12 | fi |
| 13 | |
| 14 | UPDATES=/home/users/fdrake/python-docs-update.tar.bz2 |
| 15 | |
| 16 | if [ -f "$UPDATES" ] ; then |
| 17 | cd /home/groups/python/htdocs |
| 18 | rm -rf devel-docs || exit $? |
| 19 | mkdir devel-docs || exit $? |
| 20 | cd devel-docs || exit $? |
| 21 | (bzip2 -dc "$UPDATES" | tar xf -) || exit $? |
| 22 | rm "$UPDATES" || exit $? |
| 23 | Mail -s '[online doc updates]' fdrake@acm.org <<EOF |
| 24 | Development version of documentation updated: |
| 25 | http://python.sourceforge.net/devel-docs/ |
| 26 | EOF |
| 27 | fi |