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
|
#!/bin/sh
#
# new-upstream: copyright 2007 by Vincent Fourmond.
# See debian/copyright file for details.
#
# Called by uscan; from uscan(1):
#
# Finally, if a third parameter (an action) is given in the watchfile
# line, this is taken as the name of a command, and the command
# command --upstream-version version filename
#
# is executed, using either the original file or the symlink name.
#
# Thanks to Sam Morris <sam@robots.org.uk> for giving me the idea
#
version=$2
filename=$3
dir=`mktemp -d`
# We repackage the upstream source zip file:
unzip $filename -d $dir
origname=statsvn_$version.dfsg.orig.tar.bz2
# We repackage excluding the lib/ subdir -- and various other ones
cd $dir
tar cvj \
--exclude '*/lib/*.jar' \
--exclude 'bin' \
--exclude '*jtreemap*.jar' \
--exclude 'tests-src' \
--exclude 'site' \
--exclude 'src-temp' \
--exclude 'build' \
--exclude 'doc' \
-f $origname stat*
cd -
mv $dir/$origname ..
rm -rf $dir
|