summaryrefslogtreecommitdiffstats
path: root/Doc/tools/mktarball.sh
blob: e9d0c994888932a4dd9f69468b6a0ba1b22baf8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#! /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:
#	./mktarball.sh [tag]
#
#  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

VERSION=1.5

TEMPDIR=tmp.$$
MYDIR=`pwd`

TAG="$1"

mkdirhier $TEMPDIR/Python-$VERSION/Doc || exit $?
if [ "$TAG" ] ; then
    cvs export -r $TAG -d $TEMPDIR/Python-$VERSION/Doc python/dist/src/Doc \
     || exit $?
else
    cvs checkout -d $TEMPDIR/Python-$VERSION/Doc python/dist/src/Doc || exit $?
    rm -r `find $TEMPDIR -name CVS -print` || exit $?
fi

cd $TEMPDIR

(tar cf - Python-$VERSION | gzip -9 >$MYDIR/latex-$VERSION.tar.gz) || exit $?
cd $MYDIR
rm -r $TEMPDIR || exit $?

exit 0