File: new-upstream

package info (click to toggle)
statsvn 0.7.0.dfsg-10
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 1,324 kB
  • sloc: xml: 5,959; java: 4,082; sh: 81; makefile: 5
file content (40 lines) | stat: -rwxr-xr-x 975 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
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