2000-10-19 02:54:51 -03:00
|
|
|
#! /bin/sh
|
|
|
|
|
|
|
|
# Script to push docs from my development area to SourceForge, where the
|
|
|
|
# update-docs.sh script unpacks them into their final destination.
|
|
|
|
|
2002-04-01 16:15:05 -04:00
|
|
|
TARGETHOST=www.python.org
|
|
|
|
TARGETDIR=/usr/home/fdrake/tmp
|
|
|
|
|
|
|
|
TARGET="$TARGETHOST:$TARGETDIR"
|
2000-11-30 03:38:59 -04:00
|
|
|
|
2001-03-02 17:05:58 -04:00
|
|
|
ADDRESSES='python-dev@python.org doc-sig@python.org python-list@python.org'
|
|
|
|
|
2003-09-28 19:14:29 -03:00
|
|
|
TOOLDIR="`dirname $0`"
|
|
|
|
VERSION=`$TOOLDIR/getversioninfo`
|
|
|
|
|
|
|
|
# Set $EXTRA to something non-empty if this is a non-trunk version:
|
2001-04-22 03:20:31 -03:00
|
|
|
EXTRA=`echo "$VERSION" | sed 's/^[0-9][0-9]*\.[0-9][0-9]*//'`
|
2003-09-28 19:14:29 -03:00
|
|
|
|
|
|
|
if echo "$EXTRA" | grep -q '[.]' ; then
|
2001-04-22 03:20:31 -03:00
|
|
|
DOCLABEL="maintenance"
|
|
|
|
DOCTYPE="maint"
|
|
|
|
else
|
|
|
|
DOCLABEL="development"
|
|
|
|
DOCTYPE="devel"
|
|
|
|
fi
|
|
|
|
|
2001-03-02 17:05:58 -04:00
|
|
|
EXPLANATION=''
|
2001-08-08 02:41:01 -03:00
|
|
|
ANNOUNCE=true
|
2001-03-02 17:05:58 -04:00
|
|
|
|
2001-06-12 10:31:37 -03:00
|
|
|
while [ "$#" -gt 0 ] ; do
|
|
|
|
case "$1" in
|
|
|
|
-m)
|
|
|
|
EXPLANATION="$2"
|
|
|
|
shift 2
|
|
|
|
;;
|
2001-08-08 02:41:01 -03:00
|
|
|
-q)
|
|
|
|
ANNOUNCE=false
|
|
|
|
shift 1
|
|
|
|
;;
|
2001-06-12 10:31:37 -03:00
|
|
|
-t)
|
|
|
|
DOCTYPE="$2"
|
|
|
|
shift 2
|
|
|
|
;;
|
|
|
|
-F)
|
|
|
|
EXPLANATION="`cat $2`"
|
|
|
|
shift 2
|
|
|
|
;;
|
|
|
|
-*)
|
|
|
|
echo "Unknown option: $1" >&2
|
|
|
|
exit 2
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
break
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
if [ "$1" ] ; then
|
|
|
|
if [ "$EXPLANATION" ] ; then
|
|
|
|
echo "Explanation may only be given once!" >&2
|
|
|
|
exit 2
|
|
|
|
fi
|
|
|
|
EXPLANATION="$1"
|
|
|
|
shift
|
2000-11-30 03:38:59 -04:00
|
|
|
fi
|
|
|
|
|
2000-10-19 02:54:51 -03:00
|
|
|
START="`pwd`"
|
|
|
|
MYDIR="`dirname $0`"
|
|
|
|
cd "$MYDIR"
|
|
|
|
MYDIR="`pwd`"
|
|
|
|
|
2000-10-24 16:59:55 -03:00
|
|
|
cd ..
|
2001-03-02 17:05:58 -04:00
|
|
|
|
|
|
|
# now in .../Doc/
|
|
|
|
make --no-print-directory bziphtml || exit $?
|
2003-09-28 19:14:29 -03:00
|
|
|
PACKAGE="html-$VERSION.tar.bz2"
|
2001-04-13 02:13:55 -03:00
|
|
|
scp "$PACKAGE" tools/update-docs.sh $TARGET/ || exit $?
|
2002-04-01 16:15:05 -04:00
|
|
|
ssh "$TARGETHOST" tmp/update-docs.sh $DOCTYPE $PACKAGE '&&' rm tmp/update-docs.sh || exit $?
|
2001-03-02 17:05:58 -04:00
|
|
|
|
2001-08-08 02:41:01 -03:00
|
|
|
if $ANNOUNCE ; then
|
|
|
|
sendmail $ADDRESSES <<EOF
|
2001-07-06 20:45:16 -03:00
|
|
|
To: $ADDRESSES
|
|
|
|
From: "Fred L. Drake" <fdrake@acm.org>
|
|
|
|
Subject: [$DOCLABEL doc updates]
|
2002-04-04 14:06:06 -04:00
|
|
|
X-No-Archive: yes
|
2001-07-06 20:45:16 -03:00
|
|
|
|
2001-07-12 18:50:10 -03:00
|
|
|
The $DOCLABEL version of the documentation has been updated:
|
2001-03-02 17:05:58 -04:00
|
|
|
|
2002-04-01 16:15:05 -04:00
|
|
|
http://$TARGETHOST/dev/doc/$DOCTYPE/
|
2001-03-02 17:05:58 -04:00
|
|
|
|
|
|
|
$EXPLANATION
|
|
|
|
EOF
|
2001-08-08 02:41:01 -03:00
|
|
|
exit $?
|
|
|
|
fi
|