File: git-transform.sh

package info (click to toggle)
bnd 1.50.0-5
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 5,828 kB
  • sloc: java: 39,896; xml: 1,572; makefile: 112; sh: 53
file content (35 lines) | stat: -rw-r--r-- 952 bytes parent folder | download | duplicates (4)
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
#!/bin/bash
# Usage: git-transform src dest

set -e

SRC=$1
DEST=$2
SRC=${SRC:-bnd-git}
DEST=${DEST:-bnd-clean}
VERSION=$(dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' '| cut -d: -f2- | cut -d'-' -f 1)

rm -rf $DEST

echo "Copy files..."
rsync --cvs-exclude -r --exclude '**/*.class' --exclude '**/*.jar' --exclude '.git*' $SRC/ $DEST/

echo "Cleanup..."

# Remove all JARs
find $DEST/cnf/repo/ -name "*.jar" -delete
rm -rf $DEST/biz.aQute.bndlib/maven/org/apache
rm -rf $DEST/biz.aQute.bndlib/jar/

# Remove Eclipse compiler, not needed and under EPL-v1
rm -rf $DEST/biz.aQute.eclipse.compiler

# Remove bld (to many dependencies)
rm -rf $DEST/biz.aQute.bld

# Cleanup of binary blobs
rm -rf $DEST/biz.aQute.bndlib/test/maven-repo/
rm -rf $DEST/biz.aQute.bndlib/src/test/*.jclass
rm -rf $DEST/biz.aQute.bndlib/src/test/*.clazz
rm -rf $DEST/biz.aQute.bndlib/test/beasymock.bar
rm -rf $DEST/biz.aQute.bndlib/test/eclipse/plugins/beasymock.bar