File: new-upstream

package info (click to toggle)
statcvs 1%3A0.7.0.dfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 1,708 kB
  • ctags: 1,988
  • sloc: java: 10,471; xml: 4,365; sh: 47; makefile: 19
file content (36 lines) | stat: -rwxr-xr-x 879 bytes parent folder | download | duplicates (6)
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