| Rev | Line | |
|---|
| [3225] | 1 | #! /bin/sh
|
|---|
| 2 |
|
|---|
| 3 | # Script which installs a development snapshot of the documentation
|
|---|
| 4 | # into the development website.
|
|---|
| 5 | #
|
|---|
| 6 | # The push-docs.sh script pushes this to the server when needed
|
|---|
| 7 | # and removes it when done.
|
|---|
| 8 |
|
|---|
| 9 | if [ -z "$HOME" ] ; then
|
|---|
| 10 | HOME=`grep "$LOGNAME" /etc/passwd | sed 's|^.*:\([^:]*\):[^:]*$|\1|'`
|
|---|
| 11 | export HOME
|
|---|
| 12 | fi
|
|---|
| 13 |
|
|---|
| 14 | DOCTYPE="$1"
|
|---|
| 15 | UPDATES="$HOME/tmp/$2"
|
|---|
| 16 |
|
|---|
| 17 | TMPDIR="$$-docs"
|
|---|
| 18 |
|
|---|
| 19 | cd /ftp/ftp.python.org/pub/www.python.org/dev/doc/ || exit $?
|
|---|
| 20 | mkdir $TMPDIR || exit $?
|
|---|
| 21 | cd $TMPDIR || exit $?
|
|---|
| 22 | (bzip2 -dc "$UPDATES" | tar xf -) || exit $?
|
|---|
| 23 | cd .. || exit $?
|
|---|
| 24 |
|
|---|
| 25 | if [ -d $DOCTYPE ] ; then
|
|---|
| 26 | mv $DOCTYPE $DOCTYPE-temp
|
|---|
| 27 | fi
|
|---|
| 28 | mv $TMPDIR/Python-Docs-* $DOCTYPE
|
|---|
| 29 | rmdir $TMPDIR
|
|---|
| 30 | rm -rf $DOCTYPE-temp || exit $?
|
|---|
| 31 | mv "$UPDATES" python-docs-$DOCTYPE.tar.bz2 || exit $?
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.