1234567891011121314151617181920212223242526272829 |
- #!/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=texworks
- cd "$tmp"
- svn checkout http://texworks.googlecode.com/svn/trunk/ $dirname
- cd $dirname
- VERSION=`cat src/TWVersion.h | grep TEXWORKS_VERSION | sed s/\"//g | cut -f2`
- 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}
- cd ${pwd} >/dev/null
- exit
|