Initial import to Tizen
[profile/ivi/python-pyOpenSSL.git] / doc / tools / push-docs.sh
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
6 TARGET=python.sourceforge.net:/home/users/fdrake/tmp
7
8 ADDRESSES='python-dev@python.org doc-sig@python.org python-list@python.org'
9
10 EXPLANATION=''
11
12 if [ "$1" = '-m' ] ; then
13     EXPLANATION="$2"
14     shift 2
15 elif [ "$1" ] ; then
16     EXPLANATION="`cat $1`"
17     shift 1
18 fi
19
20 START="`pwd`"
21 MYDIR="`dirname $0`"
22 cd "$MYDIR"
23 MYDIR="`pwd`"
24
25 cd ..
26
27 # now in .../Doc/
28 make --no-print-directory || exit $?
29 make --no-print-directory bziphtml || exit $?
30 RELEASE=`grep '^RELEASE=' Makefile | sed 's|RELEASE=||'`
31 PACKAGE="html-$RELEASE.tar.bz2"
32 scp "$PACKAGE" tools/update-docs.sh $TARGET/ || exit $?
33 ssh python.sourceforge.net tmp/update-docs.sh $PACKAGE '&&' rm tmp/update-docs.sh || exit $?
34
35 Mail -s '[development doc updates]' $ADDRESSES <<EOF
36 The development version of the documentation has been updated:
37
38         http://python.sourceforge.net/devel-docs/
39
40 $EXPLANATION
41 EOF
42 exit $?