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 32 33 34 35 36 37 38 39 40 41 42 43
|
#!/bin/sh
# bail out with the first problem
set -e
# script to download and repack source package of opencaster
PKG=`dpkg-parsechangelog | awk '/^Source/ { print $2 }'`
echo "I: PKG: $PKG"
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/"`
echo "I: version: $VERSION"
# mkdir -p does not fail when directories exist already
mkdir -p ../tarballs
cd ../tarballs
TARBALLDIR=`pwd`
UPSTREAMDIR=${PKG}-${VERSION}
echo "I: upstreamdir: ${UPSTREAMDIR}"
mkdir -p ${UPSTREAMDIR}
cd ${UPSTREAMDIR}
tar --strip-components=1 -zxf ../../${PKG}_${VERSION}.orig.tar.gz
# remove all named pipes
echo "I: `pwd`"
#not anymore: find -type p|xargs rm
# remove all class files
rm -rf tutorials/mhp/ocdir1
rm -rf tutorials/mhp-streamevents/ocdir2
# remove png without preferred form of modification
rm -f tutorials/encodingHD/logo_tv.png
rm -f tutorials/encoding/logo_tv.png
cd ..
GZIP="--best --no-name" tar -czf "$PKG"_"$VERSION"+dfsg.orig.tar.gz "${UPSTREAMDIR}"
rm -rf "${UPSTREAMDIR}"
|