File: orig-tar.sh

package info (click to toggle)
libflexdock-java 0.5.1-dfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 5,264 kB
  • ctags: 4,256
  • sloc: java: 21,287; xml: 717; ansic: 101; makefile: 20; sh: 13
file content (25 lines) | stat: -rw-r--r-- 619 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
22
23
24
25
#!/bin/sh -e

# called by uscan with '--upstream-version' <version> <file>

VERSION=$(dpkg-parsechangelog | sed -ne 's,^Version: \(.*\)-.*,\1,p')
SOURCE=$(dpkg-parsechangelog | sed -ne 's,Source: \(.*\),\1,p')

DIR=flexdock-${VERSION}
TAR=../${SOURCE}_${VERSION}.orig.tar.gz

# clean up the upstream tarball
# Export to the $DIR directory since there is no directory in 
# the archive
unzip $3 -d $DIR
tar -c -z -f $TAR -X debian/orig-tar.exclude $DIR
rm -rf $DIR $3

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

exit 0