- applied email MessageRecord patch from Brian Edginton (thanks!)
[barry.git] / maintainer / make-release-tar.sh
blobb63fa152a9b6ce472483b5150c040c9b29e4a0c9
1 #!/bin/sh
3 if [ -z "$CVSROOT" ] ; then
4 CVSROOT=":ext:ndprojects@barry.cvs.sourceforge.net:/cvsroot/barry"
5 fi
6 if [ -z "$CVSREP" ] ; then
7 CVSREP="barry"
8 fi
10 echo
11 echo "Pulling from: $CVSROOT"
12 echo "Using directory: $CVSREP"
14 if [ -z "$1" -o -z "$2" ] ; then
15 echo
16 echo "Usage: ./make-release-tar.sh MAJOR MINOR"
17 echo " or"
18 echo " ./make-release-tar.sh MAJOR MINOR HEAD"
19 echo
20 echo "MAJOR is the desired major version number"
21 echo "MINOR is the desired minor version number"
22 echo "HEAD is a literal string to override the default behaviour"
23 echo " of retrieving the CVS tagged major/minor revision, and"
24 echo " instead, just fetching the HEAD version, and packaging"
25 echo " it up as version MAJOR.MINOR."
26 echo
27 echo "Set the environment var CVSROOT to use a different repository."
28 echo "Set CVSREP to a different directory if needed."
29 echo
30 exit 1
33 DIRNAME="barry-$1.$2"
34 TAGNAME="barry-$1_$2"
36 mkdir build
37 cd build || exit 1
39 set -e
41 if [ "$3" != "HEAD" ] ; then
42 cvs -z3 -d "$CVSROOT" co -d $DIRNAME -r $TAGNAME "$CVSREP"
43 echo "Fetched tag: $TAGNAME"
44 else
45 cvs -z3 -d "$CVSROOT" co -d $DIRNAME "$CVSREP"
46 echo "Fetched HEAD"
48 (cd $DIRNAME && ./buildgen.sh)
49 (cd $DIRNAME/gui && ./buildgen.sh)
50 rm -rf "$DIRNAME/autom4te.cache" "$DIRNAME/gui/autom4te.cache"
51 tar --exclude=CVS -cvf - $DIRNAME | gzip -9 > barry-$1.$2.tar.gz