summaryrefslogtreecommitdiffstats
path: root/Doc/tools/push-docs.sh
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2004-06-17 18:36:54 (GMT)
committerFred Drake <fdrake@acm.org>2004-06-17 18:36:54 (GMT)
commit9e1ac2496fd3a5e1126162b7734ff26aed4495df (patch)
treeee26960b198fa5dbd330a9fd4f87e3268e5242ea /Doc/tools/push-docs.sh
parent1ce9e4cfc1b4bb48c209ee23e5454efdcb9ef234 (diff)
downloadcpython-9e1ac2496fd3a5e1126162b7734ff26aed4495df.zip
cpython-9e1ac2496fd3a5e1126162b7734ff26aed4495df.tar.gz
cpython-9e1ac2496fd3a5e1126162b7734ff26aed4495df.tar.bz2
- add link to the downloadable package in the generated email
- misc. changes
Diffstat (limited to 'Doc/tools/push-docs.sh')
-rwxr-xr-xDoc/tools/push-docs.sh26
1 files changed, 24 insertions, 2 deletions
diff --git a/Doc/tools/push-docs.sh b/Doc/tools/push-docs.sh
index e361f6f..294254a 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