blob: 4d5ad792739bc0aefaf0e72ecaf059049b7a978e [file] [log] [blame]
Fred Drakefcf275e1998-03-03 17:22:44 +00001#! /bin/sh
2#
3# script to create the latex source distribution
4# * should be modified to get the Python version number automatically
5# from the Makefile or someplace.
6#
7# usage:
Fred Draked29cf371998-10-21 14:26:26 +00008# ./mktarball.sh [-t|--tools] release [tag]
9#
10# with -t|--tools: doesn't include the documents, only the framework
Fred Drakefcf275e1998-03-03 17:22:44 +000011#
12# without [tag]: generate from the current version that's checked in
13# (*NOT* what's in the current directory!)
14#
15# with [tag]: generate from the named tag
16
Fred Draked29cf371998-10-21 14:26:26 +000017# VERSION='$Revision$'
18
19if [ "$1" = "-t" -o "$1" = "--tools" ] ; then
20 shift 1
21 TOOLS_ONLY=true
22fi
23
Fred Drakef2fa1e21998-05-11 18:52:24 +000024RELEASE=$1; shift
Fred Drakefcf275e1998-03-03 17:22:44 +000025
26TEMPDIR=tmp.$$
27MYDIR=`pwd`
28
29TAG="$1"
30
Fred Drakee3ae5191998-04-13 21:55:56 +000031mkdirhier $TEMPDIR/Python-$RELEASE/Doc || exit $?
Fred Drakefcf275e1998-03-03 17:22:44 +000032if [ "$TAG" ] ; then
Fred Drakee3ae5191998-04-13 21:55:56 +000033 cvs export -r $TAG -d $TEMPDIR/Python-$RELEASE/Doc python/dist/src/Doc \
Fred Drake2888bf61998-03-05 16:31:22 +000034 || exit $?
Fred Drakefcf275e1998-03-03 17:22:44 +000035else
Fred Drakee3ae5191998-04-13 21:55:56 +000036 cvs checkout -d $TEMPDIR/Python-$RELEASE/Doc python/dist/src/Doc || exit $?
Fred Drakefcf275e1998-03-03 17:22:44 +000037 rm -r `find $TEMPDIR -name CVS -print` || exit $?
38fi
39
Fred Drakef2fa1e21998-05-11 18:52:24 +000040rm -f `find $TEMPDIR -name .cvsignore -print`
Fred Drake45e564d1998-03-10 14:00:55 +000041
Fred Drakee3ae5191998-04-13 21:55:56 +000042rm -f $TEMPDIR/Python-$RELEASE/Doc/ref/ref.pdf
43rm -f $TEMPDIR/Python-$RELEASE/Doc/ref/ref.ps
Fred Drake45e564d1998-03-10 14:00:55 +000044
Fred Drakefcf275e1998-03-03 17:22:44 +000045
Fred Draked29cf371998-10-21 14:26:26 +000046if [ "$TOOLS_ONLY" ] ; then
47 cd $TEMPDIR/Python-$RELEASE/Doc
48 # remove the actual documents
49 rm -rf api ext lib mac ref tut
50 cd ..
51 (tar cf - Doc | gzip -9 >$MYDIR/tools-$RELEASE.tgz) || exit $?
52else
53 cd $TEMPDIR
54
55 (tar cf - Python-$RELEASE | gzip -9 >$MYDIR/latex-$RELEASE.tgz) || exit $?
56fi
Fred Drakefcf275e1998-03-03 17:22:44 +000057cd $MYDIR
58rm -r $TEMPDIR || exit $?
59
60exit 0