1998-03-03 13:22:44 -04:00
|
|
|
#! /bin/sh
|
|
|
|
#
|
|
|
|
# script to create the latex source distribution
|
|
|
|
# * should be modified to get the Python version number automatically
|
|
|
|
# from the Makefile or someplace.
|
|
|
|
#
|
|
|
|
# usage:
|
1998-10-21 11:26:26 -03:00
|
|
|
# ./mktarball.sh [-t|--tools] release [tag]
|
|
|
|
#
|
|
|
|
# with -t|--tools: doesn't include the documents, only the framework
|
1998-03-03 13:22:44 -04:00
|
|
|
#
|
|
|
|
# without [tag]: generate from the current version that's checked in
|
|
|
|
# (*NOT* what's in the current directory!)
|
|
|
|
#
|
|
|
|
# with [tag]: generate from the named tag
|
|
|
|
|
1998-10-21 11:26:26 -03:00
|
|
|
# VERSION='$Revision$'
|
|
|
|
|
1999-07-27 13:29:30 -03:00
|
|
|
GZIP='gzip -9'
|
|
|
|
GZIPEXT=tgz
|
|
|
|
|
1998-10-21 11:26:26 -03:00
|
|
|
if [ "$1" = "-t" -o "$1" = "--tools" ] ; then
|
|
|
|
shift 1
|
|
|
|
TOOLS_ONLY=true
|
|
|
|
fi
|
1999-07-23 13:09:11 -03:00
|
|
|
if [ "$1" = "-z" -o "$1" = "--zip" ] ; then
|
|
|
|
shift 1
|
|
|
|
USE_ZIP=true
|
|
|
|
fi
|
1999-07-27 13:29:30 -03:00
|
|
|
if [ "$1" = "-g" -o "$1" = "--targz" -o "$1" = "--tgz" ] ; then
|
1999-07-23 13:09:11 -03:00
|
|
|
shift 1
|
|
|
|
USE_ZIP=''
|
|
|
|
fi
|
1999-07-27 13:29:30 -03:00
|
|
|
if [ "$1" = "-b" -o "$1" = "--bz2" -o "$1" = "--bzip2" ] ; then
|
|
|
|
shift 1
|
|
|
|
GZIP='bzip2 -9'
|
|
|
|
GZIPEXT=tar.bz2
|
|
|
|
fi
|
1998-10-21 11:26:26 -03:00
|
|
|
|
1998-05-11 15:52:24 -03:00
|
|
|
RELEASE=$1; shift
|
1998-03-03 13:22:44 -04:00
|
|
|
|
|
|
|
TEMPDIR=tmp.$$
|
|
|
|
MYDIR=`pwd`
|
|
|
|
|
|
|
|
TAG="$1"
|
|
|
|
|
1998-04-13 18:55:56 -03:00
|
|
|
mkdirhier $TEMPDIR/Python-$RELEASE/Doc || exit $?
|
1998-03-03 13:22:44 -04:00
|
|
|
if [ "$TAG" ] ; then
|
1998-04-13 18:55:56 -03:00
|
|
|
cvs export -r $TAG -d $TEMPDIR/Python-$RELEASE/Doc python/dist/src/Doc \
|
1998-03-05 12:31:22 -04:00
|
|
|
|| exit $?
|
1998-03-03 13:22:44 -04:00
|
|
|
else
|
1998-04-13 18:55:56 -03:00
|
|
|
cvs checkout -d $TEMPDIR/Python-$RELEASE/Doc python/dist/src/Doc || exit $?
|
1998-03-03 13:22:44 -04:00
|
|
|
rm -r `find $TEMPDIR -name CVS -print` || exit $?
|
|
|
|
fi
|
|
|
|
|
1998-05-11 15:52:24 -03:00
|
|
|
rm -f `find $TEMPDIR -name .cvsignore -print`
|
1998-03-10 10:00:55 -04:00
|
|
|
|
1998-04-13 18:55:56 -03:00
|
|
|
rm -f $TEMPDIR/Python-$RELEASE/Doc/ref/ref.pdf
|
|
|
|
rm -f $TEMPDIR/Python-$RELEASE/Doc/ref/ref.ps
|
1998-03-10 10:00:55 -04:00
|
|
|
|
1998-03-03 13:22:44 -04:00
|
|
|
|
1998-10-21 11:26:26 -03:00
|
|
|
if [ "$TOOLS_ONLY" ] ; then
|
|
|
|
cd $TEMPDIR/Python-$RELEASE/Doc
|
|
|
|
# remove the actual documents
|
|
|
|
rm -rf api ext lib mac ref tut
|
|
|
|
cd ..
|
1999-07-23 13:09:11 -03:00
|
|
|
if [ "$USE_ZIP" ] ; then
|
|
|
|
zip -r9 tools-$RELEASE.zip Doc || exit
|
|
|
|
else
|
1999-07-27 13:29:30 -03:00
|
|
|
(tar cf - Doc | $GZIP >$MYDIR/tools-$RELEASE.$GZIPEXT) || exit $?
|
1999-07-23 13:09:11 -03:00
|
|
|
fi
|
1998-10-21 11:26:26 -03:00
|
|
|
else
|
|
|
|
cd $TEMPDIR
|
1999-07-23 13:09:11 -03:00
|
|
|
if [ "$USE_ZIP" ] ; then
|
|
|
|
zip -r9 $MYDIR/latex-$RELEASE.zip Python-$RELEASE || exit $?
|
|
|
|
else
|
1999-07-27 13:29:30 -03:00
|
|
|
(tar cf - Python-$RELEASE | $GZIP >$MYDIR/latex-$RELEASE.$GZIPEXT) \
|
1999-07-23 13:09:11 -03:00
|
|
|
|| exit $?
|
|
|
|
fi
|
1998-10-21 11:26:26 -03:00
|
|
|
fi
|
1998-03-03 13:22:44 -04:00
|
|
|
cd $MYDIR
|
|
|
|
rm -r $TEMPDIR || exit $?
|
|
|
|
|
|
|
|
exit 0
|