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 |
| 4 | # into the "Python @ SourceForge" website. |
Fred Drake | 692565c | 2000-10-19 05:54:51 +0000 | [diff] [blame] | 5 | # |
Fred Drake | 3f4e717 | 2001-03-02 21:05:58 +0000 | [diff] [blame] | 6 | # The push-docs.sh script pushes this to the SourceForge when needed |
| 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 | 283b352 | 2001-05-09 16:33:34 +0000 | [diff] [blame] | 19 | cd /home/groups/p/py/python/htdocs || 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 | |
| 25 | if [ -d $DOCTYPE-docs ] ; then |
| 26 | mv $DOCTYPE-docs $DOCTYPE-temp |
| 27 | fi |
| 28 | mv $TMPDIR $DOCTYPE-docs |
| 29 | rm -rf $DOCTYPE-temp || exit $? |
Fred Drake | 3f4e717 | 2001-03-02 21:05:58 +0000 | [diff] [blame] | 30 | rm "$UPDATES" || exit $? |