gmtk-snapshot.sh 768 B

12345678910111213141516171819202122232425262728293031
  1. #!/bin/bash
  2. set -e
  3. tmp=$(mktemp -d)
  4. trap cleanup EXIT
  5. cleanup() {
  6. set +e
  7. [ -z "$tmp" -o ! -d "$tmp" ] || rm -rf "$tmp"
  8. }
  9. unset CDPATH
  10. pwd=$(pwd)
  11. dirname=gmtk
  12. cd "$tmp"
  13. svn checkout http://gmtk.googlecode.com/svn/trunk/ $dirname
  14. cd $dirname
  15. #eval `autoconf configure.in | egrep '^[[:blank:]]*VERSION='`
  16. eval $(egrep '^[[:blank:]]*PACKAGE_VERSION=' configure) && VERSION=$PACKAGE_VERSION || exit 1
  17. REVISION=`LC_ALL=C svn info 2> /dev/null | grep Revision | cut -d' ' -f2`
  18. find . -type d -name .svn -print0 | xargs -0r rm -rf
  19. cd ..
  20. mv $dirname ${dirname}-${VERSION}
  21. #tar jcf "$pwd"/${dirname}-${VERSION}.svn${REVISION}.tar.bz2 ${dirname}-${VERSION}
  22. tar Jcf "$pwd"/${dirname}-${VERSION}.svn${REVISION}.tar.xz ${dirname}-${VERSION}
  23. cd ${pwd} >/dev/null
  24. exit