3 # make-release.sh: make an Expat release
5 # USAGE: make-release.sh tagname
7 # Note: tagname may be HEAD to just grab the head revision (e.g. for testing)
11 echo "USAGE: $0 tagname"
15 tmpdir
=expat-release.$$
16 if test -e $tmpdir; then
17 echo "ERROR: oops. chose the $tmpdir subdir, but it exists."
21 echo "Checking out into temporary area: $tmpdir"
22 cvs
-d :pserver
:anonymous@cvs.libexpat.org
:/cvsroot
/expat
export -r "$1" -d $tmpdir expat ||
exit 1
25 echo "----------------------------------------------------------------------"
26 echo "Preparing $tmpdir for release (running buildconf.sh)"
27 (cd $tmpdir && .
/buildconf.sh
) ||
exit 1
29 # figure out the release version
30 vsn
="`$tmpdir/conftools/get-version.sh $tmpdir/lib/expat.h`"
33 echo "Release version: $vsn"
35 if test "$1" = HEAD
; then
36 distdir
=expat-
`date '+%Y-%m-%d'`
40 if test -e $distdir; then
41 echo "ERROR: for safety, you must manually remove $distdir."
45 mkdir
$distdir ||
exit 1
48 echo "----------------------------------------------------------------------"
49 echo "Building $distdir based on the MANIFEST:"
50 files
="`sed -e 's/[ ]:.*$//' $tmpdir/MANIFEST`"
51 for file in $files; do
52 echo "Copying $file..."
53 (cd $tmpdir && cp -Pp $file ..
/$distdir) ||
exit 1
57 echo "----------------------------------------------------------------------"
58 echo "Removing (temporary) checkout directory..."
61 tarball
=$distdir.
tar.gz
62 echo "Constructing $tarball..."
63 tar cf
- $distdir |
gzip -9 > $tarball