File: get-svn-source

package info (click to toggle)
jsymphonic 0.3.0.Ode.To.Freedom%2Bsvn387-8
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 9,960 kB
  • ctags: 16,275
  • sloc: java: 89,194; xml: 718; sh: 96; makefile: 18
file content (60 lines) | stat: -rwxr-xr-x 1,275 bytes parent folder | download | duplicates (3)
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/sh

# Script to export the source code of jsymphonic from its SVN
# repository, and repackage that into a decent .orig tarball...

version="$1"
revision="$2"
package="jsymphonic"

if [ -z "$version" ]; then
    echo <<EOF
Usage:

  debian/get-svn-source version [revision]

  revision can be ommitted.
EOF
    exit 1;
fi

REP="http://symphonic.svn.sourceforge.net/svnroot/symphonic/jsymphonic/trunk/"

tmpdir=`mktemp -d `
curdir=`pwd`

cd $tmpdir;
if [ -z "$revision" ]; then
    echo -n "Getting revision... "
    revision=$(svn info "$REP" | grep Revision | grep -Eo '[0-9]+')
    echo $revision
else
    echo "Using user-specified revision $revision"
fi
echo 
fullversion="${version}+svn$revision"
echo "Getting $package-$fullversion"

echo "Exporting source"
dir="${package}-${fullversion}"
tarball="${package}_${fullversion}.orig.tar.bz2"
svn export -r"$revision" "$REP" "$dir"

echo 
echo '---------------------------------------------------------------'
echo 
echo "Cleaning up source..."
echo 
echo "Removing jar files:"
find -name '*.jar' -print -delete

echo "Removing precompiled class files"
find -name '*.class' -print -delete

echo 
echo "Making tarball"
tar cvjf "$curdir/../$tarball" "$dir"

echo "Cleaning up temporary files"
cd $curdir
rm -rf $tmpdir