File: svnclientadapter-get-orig-source

package info (click to toggle)
svnclientadapter 0.9.100-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,448 kB
  • sloc: java: 14,971; xml: 191; sh: 38; makefile: 9
file content (51 lines) | stat: -rwxr-xr-x 1,769 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
45
46
47
48
49
50
51
#!/bin/sh

# This script is used to download the upstream source for svnclientadapter
# and generate it into an orig source tarball for Debian.

# Common variables used to ease maintenance of this script
SVNCLIENTADAPTER_VERSION="0.9.100"
SVN_REVISION="4767"

USAGE="\n\
This script is used to generate the orig tarball used in building\n\
Debian packages for svnclientadapter-$SVNCLIENTADAPTER_VERSION.\n\
Usage: svnclientadapter-get-orig-source [OPTION]\n\
\n\
 -h, --help                 Display this help message.\n\
 --remove-upstream-source   Remove the upstream source.\n"

while [ "$#" -gt "0" ]
do
    case "$1" in
        --remove-upstream-tarball)
            REMOVE_UPSTREAM_TARBALL=1
            shift
            ;;
        -h|--help|*)
            echo "${USAGE}"
            exit 1
            ;;
    esac
done

make_current_tarball() {
    # Download the source if it's not available in the current directory
    [ -d svnclientadapter-$SVNCLIENTADAPTER_VERSION ] || \
        svn export -r $SVN_REVISION http://subclipse.tigris.org/svn/subclipse/tags/subclipse/1.6.16/svnClientAdapter \
            svnclientadapter-$SVNCLIENTADAPTER_VERSION --username guest --password ""

    rm -rf svnclientadapter-${SVNCLIENTADAPTER_VERSION}/lib
    rm -rf svnclientadapter-${SVNCLIENTADAPTER_VERSION}/test/lib
    tar --exclude-vcs -czf svnclientadapter_${SVNCLIENTADAPTER_VERSION}.orig.tar.gz \
        svnclientadapter-${SVNCLIENTADAPTER_VERSION}/
    jh_repack --upstream-version ${SVNCLIENTADAPTER_VERSION} svnclientadapter_${SVNCLIENTADAPTER_VERSION}.orig.tar.gz

    if [ $REMOVE_UPSTREAM_TARBALL ]; then
        echo -n "Removing upstream source..."
        rm svnclientadapter-$SVNCLIENTADAPTER_VERSION
        echo "done."
    fi
}

make_current_tarball