Fred Drake | fcf275e | 1998-03-03 17:22:44 +0000 | [diff] [blame] | 1 | #! /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 Drake | d29cf37 | 1998-10-21 14:26:26 +0000 | [diff] [blame] | 8 | # ./mktarball.sh [-t|--tools] release [tag] |
| 9 | # |
| 10 | # with -t|--tools: doesn't include the documents, only the framework |
Fred Drake | fcf275e | 1998-03-03 17:22:44 +0000 | [diff] [blame] | 11 | # |
| 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 Drake | d29cf37 | 1998-10-21 14:26:26 +0000 | [diff] [blame] | 17 | # VERSION='$Revision$' |
| 18 | |
| 19 | if [ "$1" = "-t" -o "$1" = "--tools" ] ; then |
| 20 | shift 1 |
| 21 | TOOLS_ONLY=true |
| 22 | fi |
| 23 | |
Fred Drake | f2fa1e2 | 1998-05-11 18:52:24 +0000 | [diff] [blame] | 24 | RELEASE=$1; shift |
Fred Drake | fcf275e | 1998-03-03 17:22:44 +0000 | [diff] [blame] | 25 | |
| 26 | TEMPDIR=tmp.$$ |
| 27 | MYDIR=`pwd` |
| 28 | |
| 29 | TAG="$1" |
| 30 | |
Fred Drake | e3ae519 | 1998-04-13 21:55:56 +0000 | [diff] [blame] | 31 | mkdirhier $TEMPDIR/Python-$RELEASE/Doc || exit $? |
Fred Drake | fcf275e | 1998-03-03 17:22:44 +0000 | [diff] [blame] | 32 | if [ "$TAG" ] ; then |
Fred Drake | e3ae519 | 1998-04-13 21:55:56 +0000 | [diff] [blame] | 33 | cvs export -r $TAG -d $TEMPDIR/Python-$RELEASE/Doc python/dist/src/Doc \ |
Fred Drake | 2888bf6 | 1998-03-05 16:31:22 +0000 | [diff] [blame] | 34 | || exit $? |
Fred Drake | fcf275e | 1998-03-03 17:22:44 +0000 | [diff] [blame] | 35 | else |
Fred Drake | e3ae519 | 1998-04-13 21:55:56 +0000 | [diff] [blame] | 36 | cvs checkout -d $TEMPDIR/Python-$RELEASE/Doc python/dist/src/Doc || exit $? |
Fred Drake | fcf275e | 1998-03-03 17:22:44 +0000 | [diff] [blame] | 37 | rm -r `find $TEMPDIR -name CVS -print` || exit $? |
| 38 | fi |
| 39 | |
Fred Drake | f2fa1e2 | 1998-05-11 18:52:24 +0000 | [diff] [blame] | 40 | rm -f `find $TEMPDIR -name .cvsignore -print` |
Fred Drake | 45e564d | 1998-03-10 14:00:55 +0000 | [diff] [blame] | 41 | |
Fred Drake | e3ae519 | 1998-04-13 21:55:56 +0000 | [diff] [blame] | 42 | rm -f $TEMPDIR/Python-$RELEASE/Doc/ref/ref.pdf |
| 43 | rm -f $TEMPDIR/Python-$RELEASE/Doc/ref/ref.ps |
Fred Drake | 45e564d | 1998-03-10 14:00:55 +0000 | [diff] [blame] | 44 | |
Fred Drake | fcf275e | 1998-03-03 17:22:44 +0000 | [diff] [blame] | 45 | |
Fred Drake | d29cf37 | 1998-10-21 14:26:26 +0000 | [diff] [blame] | 46 | if [ "$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 $? |
| 52 | else |
| 53 | cd $TEMPDIR |
| 54 | |
| 55 | (tar cf - Python-$RELEASE | gzip -9 >$MYDIR/latex-$RELEASE.tgz) || exit $? |
| 56 | fi |
Fred Drake | fcf275e | 1998-03-03 17:22:44 +0000 | [diff] [blame] | 57 | cd $MYDIR |
| 58 | rm -r $TEMPDIR || exit $? |
| 59 | |
| 60 | exit 0 |