Fred Drake | 692565c | 2000-10-19 05:54:51 +0000 | [diff] [blame] | 1 | #! /bin/sh |
| 2 | |
Fred Drake | 3f4e717 | 2001-03-02 21:05:58 +0000 | [diff] [blame] | 3 | # Script which installs a development snapshot of the documentation |
Fred Drake | f54519d | 2002-04-01 20:15:05 +0000 | [diff] [blame] | 4 | # into the development website. |
Fred Drake | 692565c | 2000-10-19 05:54:51 +0000 | [diff] [blame] | 5 | # |
Fred Drake | f54519d | 2002-04-01 20:15:05 +0000 | [diff] [blame] | 6 | # The push-docs.sh script pushes this to the server when needed |
Fred Drake | 3f4e717 | 2001-03-02 21:05:58 +0000 | [diff] [blame] | 7 | # and removes it when done. |
Fred Drake | 692565c | 2000-10-19 05:54:51 +0000 | [diff] [blame] | 8 | |
| 9 | if [ -z "$HOME" ] ; then |
| 10 | HOME=`grep fdrake /etc/passwd | sed 's|^.*:\([^:]*\):[^:]*$|\1|'` |
| 11 | export HOME |
| 12 | fi |
| 13 | |
Fred Drake | 34b48e8 | 2001-04-22 06:20:31 +0000 | [diff] [blame] | 14 | DOCTYPE="$1" |
| 15 | UPDATES="$HOME/tmp/$2" |
| 16 | |
| 17 | TMPDIR="$$-docs" |
Fred Drake | 692565c | 2000-10-19 05:54:51 +0000 | [diff] [blame] | 18 | |
Fred Drake | f54519d | 2002-04-01 20:15:05 +0000 | [diff] [blame] | 19 | cd /ftp/ftp.python.org/pub/www.python.org/dev/doc/ || exit $? |
Fred Drake | 34b48e8 | 2001-04-22 06:20:31 +0000 | [diff] [blame] | 20 | mkdir $TMPDIR || exit $? |
| 21 | cd $TMPDIR || exit $? |
Fred Drake | 3f4e717 | 2001-03-02 21:05:58 +0000 | [diff] [blame] | 22 | (bzip2 -dc "$UPDATES" | tar xf -) || exit $? |
Fred Drake | 34b48e8 | 2001-04-22 06:20:31 +0000 | [diff] [blame] | 23 | cd .. || exit $? |
| 24 | |
Fred Drake | f54519d | 2002-04-01 20:15:05 +0000 | [diff] [blame] | 25 | if [ -d $DOCTYPE ] ; then |
| 26 | mv $DOCTYPE $DOCTYPE-temp |
Fred Drake | 34b48e8 | 2001-04-22 06:20:31 +0000 | [diff] [blame] | 27 | fi |
Fred Drake | f54519d | 2002-04-01 20:15:05 +0000 | [diff] [blame] | 28 | mv $TMPDIR $DOCTYPE |
Fred Drake | 34b48e8 | 2001-04-22 06:20:31 +0000 | [diff] [blame] | 29 | rm -rf $DOCTYPE-temp || exit $? |
Fred Drake | 3f4e717 | 2001-03-02 21:05:58 +0000 | [diff] [blame] | 30 | rm "$UPDATES" || exit $? |