# Script to push docs from my development area to SourceForge, where the
# update-docs.sh script unpacks them into their final destination.
+TARGET=python.sourceforge.net:/home/users/fdrake
+
+if [ "$1" ] ; then
+ scp "$1" $TARGET/python-docs-update.txt || exit $?
+fi
+
START="`pwd`"
MYDIR="`dirname $0`"
cd "$MYDIR"
cd ..
RELEASE=`grep '^RELEASE=' Makefile | sed 's|RELEASE=||'`
make --no-print-directory HTMLDIR="$HTMLDIR" bziphtml
-scp "html-$RELEASE.tar.bz2" python.sourceforge.net:/home/users/fdrake/python-docs-update.tar.bz2
+scp "html-$RELEASE.tar.bz2" $TARGET/python-docs-update.tar.bz2
export HOME
fi
-UPDATES=/home/users/fdrake/python-docs-update.tar.bz2
+UPDATES=$HOME/python-docs-update.tar.bz2
+INFO=$HOME/python-docs-update.txt
if [ -f "$UPDATES" ] ; then
cd /home/groups/python/htdocs
cd devel-docs || exit $?
(bzip2 -dc "$UPDATES" | tar xf -) || exit $?
rm "$UPDATES" || exit $?
+ EXPLANATION="`cat $INFO`"
Mail -s '[development doc updates]' \
python-dev@python.org doc-sig@python.org \
<<EOF
The development version of the documentation has been updated:
http://python.sourceforge.net/devel-docs/
+
+$EXPLANATION
EOF
+ rm -f $HOME/python-docs-update.txt
fi