2000-10-19 02:54:51 -03:00
|
|
|
#! /bin/sh
|
|
|
|
|
2001-03-02 17:05:58 -04:00
|
|
|
# Script which installs a development snapshot of the documentation
|
2002-04-01 16:15:05 -04:00
|
|
|
# into the development website.
|
2000-10-19 02:54:51 -03:00
|
|
|
#
|
2002-04-01 16:15:05 -04:00
|
|
|
# The push-docs.sh script pushes this to the server when needed
|
2001-03-02 17:05:58 -04:00
|
|
|
# and removes it when done.
|
2000-10-19 02:54:51 -03:00
|
|
|
|
|
|
|
if [ -z "$HOME" ] ; then
|
2004-07-13 14:08:10 -03:00
|
|
|
HOME=`grep "$LOGNAME" /etc/passwd | sed 's|^.*:\([^:]*\):[^:]*$|\1|'`
|
2000-10-19 02:54:51 -03:00
|
|
|
export HOME
|
|
|
|
fi
|
|
|
|
|
2001-04-22 03:20:31 -03:00
|
|
|
DOCTYPE="$1"
|
|
|
|
UPDATES="$HOME/tmp/$2"
|
|
|
|
|
|
|
|
TMPDIR="$$-docs"
|
2000-10-19 02:54:51 -03:00
|
|
|
|
2002-04-01 16:15:05 -04:00
|
|
|
cd /ftp/ftp.python.org/pub/www.python.org/dev/doc/ || exit $?
|
2001-04-22 03:20:31 -03:00
|
|
|
mkdir $TMPDIR || exit $?
|
|
|
|
cd $TMPDIR || exit $?
|
2001-03-02 17:05:58 -04:00
|
|
|
(bzip2 -dc "$UPDATES" | tar xf -) || exit $?
|
2001-04-22 03:20:31 -03:00
|
|
|
cd .. || exit $?
|
|
|
|
|
2002-04-01 16:15:05 -04:00
|
|
|
if [ -d $DOCTYPE ] ; then
|
|
|
|
mv $DOCTYPE $DOCTYPE-temp
|
2001-04-22 03:20:31 -03:00
|
|
|
fi
|
2002-08-09 19:56:46 -03:00
|
|
|
mv $TMPDIR/Python-Docs-* $DOCTYPE
|
|
|
|
rmdir $TMPDIR
|
2001-04-22 03:20:31 -03:00
|
|
|
rm -rf $DOCTYPE-temp || exit $?
|
2004-06-17 14:19:12 -03:00
|
|
|
mv "$UPDATES" python-docs-$DOCTYPE.tar.bz2 || exit $?
|