Staging
v0.5.1
https://github.com/python/cpython
Raw File
Tip revision: 6a66a68fe6132418ad6aba5162871f0dcd3651ad authored by cvs2svn on 18 July 2003, 17:45:33 UTC
This commit was manufactured by cvs2svn to create tag 'r23c1'.
Tip revision: 6a66a68
update-docs.sh
#! /bin/sh

# Script which installs a development snapshot of the documentation
# into the development website.
#
# The push-docs.sh script pushes this to the server when needed
# and removes it when done.

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

DOCTYPE="$1"
UPDATES="$HOME/tmp/$2"

TMPDIR="$$-docs"

cd /ftp/ftp.python.org/pub/www.python.org/dev/doc/ || exit $?
mkdir $TMPDIR || exit $?
cd $TMPDIR || exit $?
(bzip2 -dc "$UPDATES" | tar xf -) || exit $?
cd .. || exit $?

if [ -d $DOCTYPE ] ; then
    mv $DOCTYPE $DOCTYPE-temp
fi
mv $TMPDIR/Python-Docs-* $DOCTYPE
rmdir $TMPDIR
rm -rf $DOCTYPE-temp || exit $?
rm "$UPDATES" || exit $?
back to top