Staging
v0.5.1
https://github.com/python/cpython
Raw File
Tip revision: 84d6457fe4b92730de50847cb238f942cd04937a authored by Georg Brandl on 05 March 2011, 13:55:23 UTC
Close 2.2 branch.
Tip revision: 84d6457
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 $DOCTYPE
rm -rf $DOCTYPE-temp || exit $?
rm "$UPDATES" || exit $?
back to top