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
|
#!/bin/sh
# repacking actions, called from uscan trough watch file
# see
# http://www.debian.org/doc/manuals/developers-reference/best-pkging-practices.html#repackagedorigtargz
# for debian repacking policy
set -e
set -x
# called by uscan with '--upstream-version' <version> <file>
basedir=polylib-$2
shortdir=$basedir.orig
dir=../$shortdir
origtarball=polylib_$2.orig.tar.gz
# clean up the upstream tarball
tar -x -z -f $3
mv $basedir $shortdir
echo "removing non-free documentation from original sources"
tar -c -z -f ../$origtarball \
--exclude="$shortdir/doc/*.pdf" --exclude="$shortdir/doc/*.gz" \
$shortdir
# removed everything accordingly
rm -rf $shortdir
exit 0
|