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.
|
|
|
|
|
2001-05-09 13:33:34 -03:00
|
|
|
TARGET=python.sourceforge.net:/home/users/f/fd/fdrake/tmp
|
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'
|
|
|
|
|
2001-04-22 03:20:31 -03:00
|
|
|
VERSION=`echo '$Revision$' | sed 's/[$]Revision: \(.*\) [$]/\1/'`
|
|
|
|
EXTRA=`echo "$VERSION" | sed 's/^[0-9][0-9]*\.[0-9][0-9]*//'`
|
|
|
|
if [ "$EXTRA" ] ; then
|
|
|
|
DOCLABEL="maintenance"
|
|
|
|
DOCTYPE="maint"
|
|
|
|
else
|
|
|
|
DOCLABEL="development"
|
|
|
|
DOCTYPE="devel"
|
|
|
|
fi
|
|
|
|
|
2001-03-02 17:05:58 -04:00
|
|
|
EXPLANATION=''
|
|
|
|
|
2001-06-12 10:31:37 -03:00
|
|
|
while [ "$#" -gt 0 ] ; do
|
|
|
|
case "$1" in
|
|
|
|
-m)
|
|
|
|
EXPLANATION="$2"
|
|
|
|
shift 2
|
|
|
|
;;
|
|
|
|
-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 || exit $?
|
|
|
|
make --no-print-directory bziphtml || exit $?
|
2000-10-19 02:54:51 -03:00
|
|
|
RELEASE=`grep '^RELEASE=' Makefile | sed 's|RELEASE=||'`
|
2001-04-13 02:13:55 -03:00
|
|
|
PACKAGE="html-$RELEASE.tar.bz2"
|
|
|
|
scp "$PACKAGE" tools/update-docs.sh $TARGET/ || exit $?
|
2001-04-22 03:20:31 -03:00
|
|
|
ssh python.sourceforge.net tmp/update-docs.sh $DOCTYPE $PACKAGE '&&' rm tmp/update-docs.sh || exit $?
|
2001-03-02 17:05:58 -04:00
|
|
|
|
2001-04-22 03:20:31 -03:00
|
|
|
Mail -s "[$DOCLABEL doc updates]" $ADDRESSES <<EOF
|
2001-03-02 17:05:58 -04:00
|
|
|
The development version of the documentation has been updated:
|
|
|
|
|
2001-06-12 10:31:37 -03:00
|
|
|
http://python.sourceforge.net/$DOCTYPE-docs/
|
2001-03-02 17:05:58 -04:00
|
|
|
|
|
|
|
$EXPLANATION
|
|
|
|
EOF
|
|
|
|
exit $?
|