12345678910111213141516171819202122232425262728293031 |
- #!/bin/bash
- set -e
- tmp=$(mktemp -d)
- trap cleanup EXIT
- cleanup() {
- set +e
- [ -z "$tmp" -o ! -d "$tmp" ] || rm -rf "$tmp"
- }
- unset CDPATH
- pwd=$(pwd)
- dirname=gmtk
- cd "$tmp"
- svn checkout http://gmtk.googlecode.com/svn/trunk/ $dirname
- cd $dirname
- #eval `autoconf configure.in | egrep '^[[:blank:]]*VERSION='`
- eval $(egrep '^[[:blank:]]*PACKAGE_VERSION=' configure) && VERSION=$PACKAGE_VERSION || exit 1
- REVISION=`LC_ALL=C svn info 2> /dev/null | grep Revision | cut -d' ' -f2`
- find . -type d -name .svn -print0 | xargs -0r rm -rf
- cd ..
- mv $dirname ${dirname}-${VERSION}
- #tar jcf "$pwd"/${dirname}-${VERSION}.svn${REVISION}.tar.bz2 ${dirname}-${VERSION}
- tar Jcf "$pwd"/${dirname}-${VERSION}.svn${REVISION}.tar.xz ${dirname}-${VERSION}
- cd ${pwd} >/dev/null
- exit
|