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
|
#!/bin/sh
#
# new-upstream: copyright 2007,2008 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`
origdir=`pwd`
# We repackage the upstream source zip file:
unzip $filename -d $dir
origname=statcvs_$version.dfsg.orig.tar.bz2
# We repackage excluding the lib/ subdir
cd $dir
cd statcvs*/
ant clean
cd ..
tar cvj --exclude '*/lib/*.jar' --exclude 'test*' --exclude 'site' \
--exclude 'jtreemap*.jar' -f $origname stat*
cd $origdir
mv $dir/$origname ..
rm -rf $dir
|