File: orig-tar.sh

package info (click to toggle)
libhamcrest-java 1.2-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 896 kB
  • sloc: java: 6,183; xml: 354; makefile: 33; sh: 14
file content (21 lines) | stat: -rwxr-xr-x 506 bytes parent folder | download | duplicates (6)
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>
VERSION=$2
TAR=../libhamcrest-java_$VERSION.orig.tar.gz
SOURCE=$(dpkg-parsechangelog | sed -ne 's,Source: \(.*\),\1,p')
DIR=${SOURCE}-$2

# clean up the upstream tarball
tar -z -x -f $3
rm $3
mv hamcrest-$2 $DIR
GZIP=--best tar -c -z -f $TAR --exclude '*.jar' --exclude '*/lib/*' $DIR
rm -rf $DIR

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