blob: c68e8755551fd2005585de5d9e141f46894170d8 [file] [log] [blame]
Fred Drake692565c2000-10-19 05:54:51 +00001#! /bin/sh
2
Fred Drake3f4e7172001-03-02 21:05:58 +00003# Script which installs a development snapshot of the documentation
Fred Drakef54519d2002-04-01 20:15:05 +00004# into the development website.
Fred Drake692565c2000-10-19 05:54:51 +00005#
Fred Drakef54519d2002-04-01 20:15:05 +00006# The push-docs.sh script pushes this to the server when needed
Fred Drake3f4e7172001-03-02 21:05:58 +00007# and removes it when done.
Fred Drake692565c2000-10-19 05:54:51 +00008
9if [ -z "$HOME" ] ; then
10 HOME=`grep fdrake /etc/passwd | sed 's|^.*:\([^:]*\):[^:]*$|\1|'`
11 export HOME
12fi
13
Fred Drake34b48e82001-04-22 06:20:31 +000014DOCTYPE="$1"
15UPDATES="$HOME/tmp/$2"
16
17TMPDIR="$$-docs"
Fred Drake692565c2000-10-19 05:54:51 +000018
Fred Drakef54519d2002-04-01 20:15:05 +000019cd /ftp/ftp.python.org/pub/www.python.org/dev/doc/ || exit $?
Fred Drake34b48e82001-04-22 06:20:31 +000020mkdir $TMPDIR || exit $?
21cd $TMPDIR || exit $?
Fred Drake3f4e7172001-03-02 21:05:58 +000022(bzip2 -dc "$UPDATES" | tar xf -) || exit $?
Fred Drake34b48e82001-04-22 06:20:31 +000023cd .. || exit $?
24
Fred Drakef54519d2002-04-01 20:15:05 +000025if [ -d $DOCTYPE ] ; then
26 mv $DOCTYPE $DOCTYPE-temp
Fred Drake34b48e82001-04-22 06:20:31 +000027fi
Fred Drakef54519d2002-04-01 20:15:05 +000028mv $TMPDIR $DOCTYPE
Fred Drake34b48e82001-04-22 06:20:31 +000029rm -rf $DOCTYPE-temp || exit $?
Fred Drake3f4e7172001-03-02 21:05:58 +000030rm "$UPDATES" || exit $?