File: orig-tar.sh

package info (click to toggle)
libhibernate-validator-java 4.0.2.GA-3
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 2,784 kB
  • ctags: 2,599
  • sloc: java: 14,915; xml: 4,470; sh: 13; makefile: 5
file content (21 lines) | stat: -rwxr-xr-x 557 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

# called by uscan with '--upstream-version' <version> <file>
SOURCE=$(dpkg-parsechangelog | sed -ne 's,Source: \(.*\),\1,p')
TAR=../${SOURCE}_$2.orig.tar.gz
DIR=$SOURCE-$2
TAG=$(echo v$2 | sed -e 's,\.,_,g')
SVN=http://anonsvn.jboss.org/repos/hibernate/validator/tags

svn export $SVN/$TAG $DIR
# clean up the upstream tarball
GZIP=--best tar -c -z -f $TAR -X debian/orig-tar.exclude $DIR
rm -rf $3 $DIR

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