File: orig-tar.sh

package info (click to toggle)
jmock2 2.5.1+dfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,296 kB
  • sloc: java: 7,436; xml: 541; sh: 122; makefile: 24; ansic: 9
file content (21 lines) | stat: -rwxr-xr-x 631 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh -e

VERSION=$2
PACKAGE=$(dpkg-parsechangelog | sed -n 's/^Source: //p')
TAR=../${PACKAGE}_${VERSION}+dfsg.orig.tar.gz
TARPOMS=../${PACKAGE}_${VERSION}+dfsg.orig-maven.tar.gz
DIR=${PACKAGE}-${VERSION}

# svn checkout sources
svn export http://svn.codehaus.org/jmock/tags/${VERSION} $DIR
# svn checkout maven poms
svn export http://svn.codehaus.org/jmock/tags/packaging-maven-${VERSION} $DIR/maven
GZIP=--best tar -c -z -f $TAR --exclude '*.jar' --exclude '*.class' $DIR
rm -rf $DIR

# move to directory 'tarballs'
if [ -r .svn/deb-layout ]; then
  . .svn/deb-layout
  mv $TAR $origDir && echo "moved $TAR to $origDir"
fi