Staging
v0.5.1
https://github.com/python/cpython
Raw File
Tip revision: 62460bb376fda652834e27d7b8e13ca9a1733a1f authored by cvs2svn on 24 September 2003, 00:51:10 UTC
This commit was manufactured by cvs2svn to create tag 'r231'.
Tip revision: 62460bb
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