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 26 27 28 29 30 31
|
#!/bin/sh
# bail out with the first problem
set -e
# script to download and repack source package of TMalign which strips the binaries from upstream tarball
PKG=`dpkg-parsechangelog | awk '/^Source/ { print $2 }'`
VERSION=`uscan --verbose --force-download | \
grep "Newest version on remote site is .* local version is .*" | \
head -n 1 | \
sed "s/Newest version on remote site is \([-0-9.]\+\),.*/\1/"`
# mkdir -p does not fail when directories exist already
mkdir -p ../tarballs
cd ../tarballs
TARBALLDIR=`pwd`
UPSTREAMDIR=${PKG}-${VERSION}
mkdir -p ${UPSTREAMDIR}
cd ${UPSTREAMDIR}
tar -xzf ../../TMtools${VERSION}.tar.gz
rm -rf TMscore TMalign
cd ..
GZIP="--best --no-name" tar -czf "$PKG"_"$VERSION".orig.tar.gz "${UPSTREAMDIR}"
rm -rf "${UPSTREAMDIR}"
|