| 1 | #!/bin/sh -e |
| 2 | # |
| 3 | # Removes unwanted content from the upstream sources. |
| 4 | # Called by uscan with '--upstream-version' <version> <file> |
| 5 | # |
| 6 | |
| 7 | VERSION=$2 |
| 8 | TAR=../mavibot_$VERSION.orig.tar.xz |
| 9 | DIR=mavibot-$VERSION |
| 10 | TAG=$(echo "$VERSION" | sed -re's/~(alpha|beta|rc|M)/-\1/') |
| 11 | |
| 12 | svn export http://svn.apache.org/repos/asf/directory/mavibot/tags/${TAG}/ $DIR |
| 13 | XZ_OPT=--best tar -c -J -f $TAR --exclude '*.jar' --exclude '*.class' $DIR |
| 14 | rm -rf $DIR ../$TAG |
| 15 | |
| 16 | # move to directory 'tarballs' |
| 17 | if [ -r .svn/deb-layout ]; then |
| 18 | . .svn/deb-layout |
| 19 | mv $TAR $origDir && echo "moved $TAR to $origDir" |
| 20 | fi |