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 |
Fred Drake | 8ea15f3 | 1999-07-23 16:09:11 +0000 | [diff] [blame^] | 23 | if [ "$1" = "-z" -o "$1" = "--zip" ] ; then |
| 24 | shift 1 |
| 25 | USE_ZIP=true |
| 26 | fi |
| 27 | if [ "$1" = "-g" -o "$1" = "--targz" ] ; then |
| 28 | shift 1 |
| 29 | USE_ZIP='' |
| 30 | fi |
Fred Drake | d29cf37 | 1998-10-21 14:26:26 +0000 | [diff] [blame] | 31 | |
Fred Drake | f2fa1e2 | 1998-05-11 18:52:24 +0000 | [diff] [blame] | 32 | RELEASE=$1; shift |
Fred Drake | fcf275e | 1998-03-03 17:22:44 +0000 | [diff] [blame] | 33 | |
| 34 | TEMPDIR=tmp.$$ |
| 35 | MYDIR=`pwd` |
| 36 | |
| 37 | TAG="$1" |
| 38 | |
Fred Drake | e3ae519 | 1998-04-13 21:55:56 +0000 | [diff] [blame] | 39 | mkdirhier $TEMPDIR/Python-$RELEASE/Doc || exit $? |
Fred Drake | fcf275e | 1998-03-03 17:22:44 +0000 | [diff] [blame] | 40 | if [ "$TAG" ] ; then |
Fred Drake | e3ae519 | 1998-04-13 21:55:56 +0000 | [diff] [blame] | 41 | 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] | 42 | || exit $? |
Fred Drake | fcf275e | 1998-03-03 17:22:44 +0000 | [diff] [blame] | 43 | else |
Fred Drake | e3ae519 | 1998-04-13 21:55:56 +0000 | [diff] [blame] | 44 | cvs checkout -d $TEMPDIR/Python-$RELEASE/Doc python/dist/src/Doc || exit $? |
Fred Drake | fcf275e | 1998-03-03 17:22:44 +0000 | [diff] [blame] | 45 | rm -r `find $TEMPDIR -name CVS -print` || exit $? |
| 46 | fi |
| 47 | |
Fred Drake | f2fa1e2 | 1998-05-11 18:52:24 +0000 | [diff] [blame] | 48 | rm -f `find $TEMPDIR -name .cvsignore -print` |
Fred Drake | 45e564d | 1998-03-10 14:00:55 +0000 | [diff] [blame] | 49 | |
Fred Drake | e3ae519 | 1998-04-13 21:55:56 +0000 | [diff] [blame] | 50 | rm -f $TEMPDIR/Python-$RELEASE/Doc/ref/ref.pdf |
| 51 | rm -f $TEMPDIR/Python-$RELEASE/Doc/ref/ref.ps |
Fred Drake | 45e564d | 1998-03-10 14:00:55 +0000 | [diff] [blame] | 52 | |
Fred Drake | fcf275e | 1998-03-03 17:22:44 +0000 | [diff] [blame] | 53 | |
Fred Drake | d29cf37 | 1998-10-21 14:26:26 +0000 | [diff] [blame] | 54 | if [ "$TOOLS_ONLY" ] ; then |
| 55 | cd $TEMPDIR/Python-$RELEASE/Doc |
| 56 | # remove the actual documents |
| 57 | rm -rf api ext lib mac ref tut |
| 58 | cd .. |
Fred Drake | 8ea15f3 | 1999-07-23 16:09:11 +0000 | [diff] [blame^] | 59 | if [ "$USE_ZIP" ] ; then |
| 60 | pwd |
| 61 | zip -r9 tools-$RELEASE.zip Doc || exit |
| 62 | else |
| 63 | (tar cf - Doc | gzip -9 >$MYDIR/tools-$RELEASE.tgz) || exit $? |
| 64 | fi |
Fred Drake | d29cf37 | 1998-10-21 14:26:26 +0000 | [diff] [blame] | 65 | else |
| 66 | cd $TEMPDIR |
Fred Drake | 8ea15f3 | 1999-07-23 16:09:11 +0000 | [diff] [blame^] | 67 | if [ "$USE_ZIP" ] ; then |
| 68 | zip -r9 $MYDIR/latex-$RELEASE.zip Python-$RELEASE || exit $? |
| 69 | else |
| 70 | (tar cf - Python-$RELEASE | gzip -9 >$MYDIR/latex-$RELEASE.tgz) \ |
| 71 | || exit $? |
| 72 | fi |
Fred Drake | d29cf37 | 1998-10-21 14:26:26 +0000 | [diff] [blame] | 73 | fi |
Fred Drake | fcf275e | 1998-03-03 17:22:44 +0000 | [diff] [blame] | 74 | cd $MYDIR |
| 75 | rm -r $TEMPDIR || exit $? |
| 76 | |
| 77 | exit 0 |