File: get-git-source

package info (click to toggle)
libvamsas-client-java 0.2~git2011.10.17%2B1b42648-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 4,108 kB
  • sloc: java: 32,555; xml: 417; sh: 47; makefile: 6
file content (44 lines) | stat: -rwxr-xr-x 809 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
34
35
36
37
38
39
40
41
42
43
44
#!/bin/sh

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

version="$1"
package="libvamsas-client-java"

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

  debian/get-git-source version
EOF
    exit 1;
fi

REP="http://source.jalview.org/git/vamsas.git"

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

cd $tmpdir;

echo "Getting git code"
git clone $REP
cd vamsas
rev=$(git rev-list --abbrev-commit HEAD | head -n1)
fullrev=`date +%Y.%m.%d`+$rev
fullversion="${version}~git$fullrev"
tarball="${package}_${fullversion}.orig.tar.bz2"

echo 
echo "Removing unnecessary files"
rm -rf .git docs packages lib tools

echo 
echo "Making tarball"
cd ..
tar cvjf "$curdir/../$tarball" vamsas

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