From 9e1ac2496fd3a5e1126162b7734ff26aed4495df Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Thu, 17 Jun 2004 18:36:54 +0000 Subject: [PATCH] - add link to the downloadable package in the generated email - misc. changes --- Doc/tools/push-docs.sh | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/Doc/tools/push-docs.sh b/Doc/tools/push-docs.sh index e361f6f1815..294254a2bd9 100755 --- a/Doc/tools/push-docs.sh +++ b/Doc/tools/push-docs.sh @@ -6,6 +6,8 @@ TARGETHOST=www.python.org TARGETDIR=/usr/home/fdrake/tmp +PKGTYPE="bzip" # must be one of: bzip, tar, zip ("tar" implies gzip) + TARGET="$TARGETHOST:$TARGETDIR" ADDRESSES='python-dev@python.org doc-sig@python.org python-list@python.org' @@ -27,12 +29,17 @@ fi EXPLANATION='' ANNOUNCE=true +# XXX Should use getopt(1) here. while [ "$#" -gt 0 ] ; do case "$1" in -m) EXPLANATION="$2" shift 2 ;; + -p) + PKGTYPE="$2" + shift 1 + ;; -q) ANNOUNCE=false shift 1 @@ -68,11 +75,22 @@ MYDIR="`dirname $0`" cd "$MYDIR" MYDIR="`pwd`" +if [ "$PKGTYPE" = bzip ] ; then + PKGEXT=tar.bz2 +elif [ "$PKGTYPE" = tar ] ; then + PKGEXT=tgz +elif [ "$PKGTYPE" = zip ] ; then + PKGEXT=zip +else + echo 1>&2 "unsupported package type: $PKGTYPE" + exit 2 +fi + cd .. # now in .../Doc/ -make --no-print-directory bziphtml || exit $? -PACKAGE="html-$VERSION.tar.bz2" +make --no-print-directory ${PKGTYPE}html || exit $? +PACKAGE="html-$VERSION.$PKGEXT" scp "$PACKAGE" tools/update-docs.sh $TARGET/ || exit $? ssh "$TARGETHOST" tmp/update-docs.sh $DOCTYPE $PACKAGE '&&' rm tmp/update-docs.sh || exit $? @@ -88,6 +106,10 @@ The $DOCLABEL version of the documentation has been updated: http://$TARGETHOST/dev/doc/$DOCTYPE/ $EXPLANATION + +A downloadable package containing the HTML is also available: + + http://$TARGETHOST/dev/doc/python-docs-$DOCTYPE.$PKGEXT EOF exit $? fi