Commit patch to not break on spaces.
[bowtie.git] / debian / get-orig-source
1 #!/bin/sh
2 # script to download and repack source package of bowtie which comes in zip format
3
4 PKG=`dpkg-parsechangelog | awk '/^Source/ { print $2 }'`
5 VERSION=`uscan --verbose --force-download | \
6     grep "Newest version on remote site is .* local version is .*" | \
7     head -n 1 | \
8     sed "s/Newest version on remote site is \([-0-9.]\+\),.*/\1/"`
9
10 mkdir -p ../tarballs
11 cd ../tarballs
12
13 UPSTREAMDIR=${PKG}-${VERSION}
14 unzip ../"${UPSTREAMDIR}-src.zip"
15
16 ## remove copy of SeqAn library - unfortunately the package does not compile
17 ## with the Debian packaged version 1.2
18 #rm -rf "${UPSTREAMDIR}"/SeqAn-1.1
19
20 GZIP="--best --no-name" tar -czf "$PKG"_"$VERSION".orig.tar.gz "${UPSTREAMDIR}"
21 rm -rf "${UPSTREAMDIR}"
22