Fred Drake | 692565c | 2000-10-19 05:54:51 +0000 | [diff] [blame] | 1 | #! /bin/sh |
| 2 | |
| 3 | # Script to push docs from my development area to SourceForge, where the |
| 4 | # update-docs.sh script unpacks them into their final destination. |
| 5 | |
Fred Drake | 3f4e717 | 2001-03-02 21:05:58 +0000 | [diff] [blame^] | 6 | TARGET=python.sourceforge.net:/home/users/fdrake/tmp |
Fred Drake | 827bb9f | 2000-11-30 07:38:59 +0000 | [diff] [blame] | 7 | |
Fred Drake | 3f4e717 | 2001-03-02 21:05:58 +0000 | [diff] [blame^] | 8 | ADDRESSES='python-dev@python.org doc-sig@python.org python-list@python.org' |
| 9 | |
| 10 | |
| 11 | set -x |
| 12 | |
| 13 | EXPLANATION='' |
| 14 | |
| 15 | if [ "$1" = '-m' ] ; then |
| 16 | EXPLANATION="$2" |
| 17 | shift 2 |
| 18 | elif [ "$1" ] ; then |
| 19 | EXPLANATION="`cat $1`" |
| 20 | shift 1 |
Fred Drake | 827bb9f | 2000-11-30 07:38:59 +0000 | [diff] [blame] | 21 | fi |
| 22 | |
Fred Drake | 692565c | 2000-10-19 05:54:51 +0000 | [diff] [blame] | 23 | START="`pwd`" |
| 24 | MYDIR="`dirname $0`" |
| 25 | cd "$MYDIR" |
| 26 | MYDIR="`pwd`" |
Fred Drake | 692565c | 2000-10-19 05:54:51 +0000 | [diff] [blame] | 27 | |
Fred Drake | 7ceab73 | 2000-10-24 19:59:55 +0000 | [diff] [blame] | 28 | cd .. |
Fred Drake | 3f4e717 | 2001-03-02 21:05:58 +0000 | [diff] [blame^] | 29 | |
| 30 | # now in .../Doc/ |
| 31 | make --no-print-directory || exit $? |
| 32 | make --no-print-directory bziphtml || exit $? |
Fred Drake | 692565c | 2000-10-19 05:54:51 +0000 | [diff] [blame] | 33 | RELEASE=`grep '^RELEASE=' Makefile | sed 's|RELEASE=||'` |
Fred Drake | 3f4e717 | 2001-03-02 21:05:58 +0000 | [diff] [blame^] | 34 | scp "html-$RELEASE.tar.bz2" $TARGET/python-docs-update.tar.bz2 || exit $? |
| 35 | scp tools/update-docs.sh $TARGET/update-docs.sh || exit $? |
| 36 | ssh python.sourceforge.net 'tmp/update-docs.sh && rm tmp/update-docs.sh' || exit $? |
| 37 | |
| 38 | Mail -s '[development doc updates]' $ADDRESSES <<EOF |
| 39 | The development version of the documentation has been updated: |
| 40 | |
| 41 | http://python.sourceforge.net/devel-docs/ |
| 42 | |
| 43 | $EXPLANATION |
| 44 | EOF |
| 45 | exit $? |