File: orig-tar.sh

package info (click to toggle)
avro-java 1.7.7-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 5,644 kB
  • sloc: java: 53,658; xml: 5,670; sh: 178; python: 12; makefile: 7
file content (33 lines) | stat: -rwxr-xr-x 890 bytes parent folder | download | duplicates (2)
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
#!/bin/sh -e
#
# Removes unwanted content from the upstream sources.
# Called by uscan with '--upstream-version' <version> <file>
#

VERSION=$2
TAR=../avro-java_$VERSION.orig.tar.xz
DIR=avro-$VERSION
TAG=$(echo "release-$VERSION" | sed -re's/~(alpha|beta|rc)/-\1-/')

svn export http://svn.apache.org/repos/asf/avro/tags/${TAG} $DIR
XZ_OPT=--best tar -c -v -J -f $TAR \
    --exclude '*.jar' \
    --exclude '*.class' \
    --exclude 'lang/c/*' \
    --exclude 'lang/c++/*' \
    --exclude 'lang/csharp/*' \
    --exclude 'lang/js/*' \
    --exclude 'lang/perl/*' \
    --exclude 'lang/php/*' \
    --exclude 'lang/py*' \
    --exclude 'lang/ruby/*' \
    --exclude '*/jquery-*.min.js' \
    --exclude '*/protovis-*.js' \
    $DIR
rm -rf $DIR ../$TAG

# move to directory 'tarballs'
if [ -r .svn/deb-layout ]; then
  . .svn/deb-layout
  mv $TAR $origDir && echo "moved $TAR to $origDir"
fi