3 # Script to push docs from my development area to SourceForge, where the
4 # update-docs.sh script unpacks them into their final destination.
6 TARGETHOST
=www.python.org
7 TARGETDIR
=/usr
/home
/fdrake
/tmp
9 TARGET
="$TARGETHOST:$TARGETDIR"
11 ADDRESSES
='python-dev@python.org doc-sig@python.org python-list@python.org'
13 TOOLDIR
="`dirname $0`"
14 VERSION
=`$TOOLDIR/getversioninfo`
16 # Set $EXTRA to something non-empty if this is a non-trunk version:
17 EXTRA
=`echo "$VERSION" | sed 's/^[0-9][0-9]*\.[0-9][0-9]*//'`
19 if echo "$EXTRA" |
grep -q '[.]' ; then
20 DOCLABEL
="maintenance"
23 DOCLABEL
="development"
30 while [ "$#" -gt 0 ] ; do
45 EXPLANATION
="`cat $2`"
49 echo "Unknown option: $1" >&2
58 if [ "$EXPLANATION" ] ; then
59 echo "Explanation may only be given once!" >&2
66 if [ "$DOCTYPE" = 'maint' ] ; then
67 # 'maint' is a symlink
79 make --no-print-directory bziphtml ||
exit $?
80 PACKAGE
="html-$VERSION.tar.bz2"
81 scp
"$PACKAGE" tools
/update-docs.sh
$TARGET/ ||
exit $?
82 ssh "$TARGETHOST" tmp
/update-docs.sh
$DOCTYPE $PACKAGE '&&' rm tmp
/update-docs.sh ||
exit $?
85 sendmail
$ADDRESSES <<EOF
87 From: "Fred L. Drake" <fdrake@acm.org>
88 Subject: [$DOCLABEL doc updates]
91 The $DOCLABEL version of the documentation has been updated:
93 http://$TARGETHOST/dev/doc/$DOCTYPE/