blob: 27366b3f3656f70517d44ca8ae9cce55312aae20 [file] [log] [blame]
Fred Drake692565c2000-10-19 05:54:51 +00001#! /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 Drake3f4e7172001-03-02 21:05:58 +00006TARGET=python.sourceforge.net:/home/users/fdrake/tmp
Fred Drake827bb9f2000-11-30 07:38:59 +00007
Fred Drake3f4e7172001-03-02 21:05:58 +00008ADDRESSES='python-dev@python.org doc-sig@python.org python-list@python.org'
9
Fred Drake34b48e82001-04-22 06:20:31 +000010VERSION=`echo '$Revision$' | sed 's/[$]Revision: \(.*\) [$]/\1/'`
11EXTRA=`echo "$VERSION" | sed 's/^[0-9][0-9]*\.[0-9][0-9]*//'`
12if [ "$EXTRA" ] ; then
13 DOCLABEL="maintenance"
14 DOCTYPE="maint"
15else
16 DOCLABEL="development"
17 DOCTYPE="devel"
18fi
19
Fred Drake3f4e7172001-03-02 21:05:58 +000020EXPLANATION=''
21
22if [ "$1" = '-m' ] ; then
23 EXPLANATION="$2"
24 shift 2
25elif [ "$1" ] ; then
26 EXPLANATION="`cat $1`"
27 shift 1
Fred Drake827bb9f2000-11-30 07:38:59 +000028fi
29
Fred Drake692565c2000-10-19 05:54:51 +000030START="`pwd`"
31MYDIR="`dirname $0`"
32cd "$MYDIR"
33MYDIR="`pwd`"
Fred Drake692565c2000-10-19 05:54:51 +000034
Fred Drake7ceab732000-10-24 19:59:55 +000035cd ..
Fred Drake3f4e7172001-03-02 21:05:58 +000036
37# now in .../Doc/
38make --no-print-directory || exit $?
39make --no-print-directory bziphtml || exit $?
Fred Drake692565c2000-10-19 05:54:51 +000040RELEASE=`grep '^RELEASE=' Makefile | sed 's|RELEASE=||'`
Fred Drakee1f3ed62001-04-13 05:13:55 +000041PACKAGE="html-$RELEASE.tar.bz2"
42scp "$PACKAGE" tools/update-docs.sh $TARGET/ || exit $?
Fred Drake34b48e82001-04-22 06:20:31 +000043ssh python.sourceforge.net tmp/update-docs.sh $DOCTYPE $PACKAGE '&&' rm tmp/update-docs.sh || exit $?
Fred Drake3f4e7172001-03-02 21:05:58 +000044
Fred Drake34b48e82001-04-22 06:20:31 +000045Mail -s "[$DOCLABEL doc updates]" $ADDRESSES <<EOF
Fred Drake3f4e7172001-03-02 21:05:58 +000046The development version of the documentation has been updated:
47
Fred Drake34b48e82001-04-22 06:20:31 +000048 http://python.sourceforge.net/$DOCTYPE-docs/
Fred Drake3f4e7172001-03-02 21:05:58 +000049
50$EXPLANATION
51EOF
52exit $?