Exceptions raised during renaming in rotating file handlers are now passed to handleE...
[python.git] / Doc / tools / update-docs.sh
blob6599c64d1140ef6f46806511e55b1c0c4252fed3
1 #! /bin/sh
3 # Script which installs a development snapshot of the documentation
4 # into the development website.
6 # The push-docs.sh script pushes this to the server when needed
7 # and removes it when done.
9 if [ -z "$HOME" ] ; then
10 HOME=`grep "$LOGNAME" /etc/passwd | sed 's|^.*:\([^:]*\):[^:]*$|\1|'`
11 export HOME
14 DOCTYPE="$1"
15 UPDATES="$HOME/tmp/$2"
17 TMPDIR="$$-docs"
19 cd /ftp/ftp.python.org/pub/www.python.org/dev/doc/ || exit $?
20 mkdir $TMPDIR || exit $?
21 cd $TMPDIR || exit $?
22 (bzip2 -dc "$UPDATES" | tar xf -) || exit $?
23 cd .. || exit $?
25 if [ -d $DOCTYPE ] ; then
26 mv $DOCTYPE $DOCTYPE-temp
28 mv $TMPDIR/Python-Docs-* $DOCTYPE
29 rmdir $TMPDIR
30 rm -rf $DOCTYPE-temp || exit $?
31 mv "$UPDATES" python-docs-$DOCTYPE.tar.bz2 || exit $?