diff options
-rwxr-xr-x | tools/make_tarball.sh | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/tools/make_tarball.sh b/tools/make_tarball.sh new file mode 100755 index 0000000..83b4e77 --- /dev/null +++ b/tools/make_tarball.sh @@ -0,0 +1,38 @@ +#! /bin/sh + +# Release package script. +# +# Usage: ./make_tarball version cvs-tag-name +# + +CVSROOT=:ext:${USER}@cvs.pgfoundry.org:/cvsroot/pgpool +export CVSROOT + +case $# in +0) + TAGOPT= + VERSION=snapshot + ;; +2) + TAGOPT="-r $2" + VERSION=$1 + ;; +*) + echo "Usage: $0 pgpoolAdmin-versino cvs-tag-name" 1>&2 + exit 1 + ;; +esac + +PACKAGE_DIR=pgpoolAdmin-$VERSION + +rm -rf $PACKAGE_DIR +cvs checkout $TAGOPT -d $PACKAGE_DIR pgpoolAdmin + +# create templates_c directory. +mkdir $PACKAGE_DIR/templates_c + +# remove CVS and tools directory +find $PACKAGE_DIR -name CVS -o -name tools -type d | xargs rm -rf + +# make tar ball +tar czf $PACKAGE_DIR.tar.gz $PACKAGE_DIR |