aboutsummaryrefslogtreecommitdiff
path: root/taler-exchange/download.sh
blob: 31d62bd56db9d9f0cb18966eca7330c23e8d88c4 (plain)
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
#!/bin/sh

# exit early on error
set -e

GIT_REPO=${GIT_REPO:-https://git.taler.net/exchange.git}
GIT_REPO_NAME=exchange
PRGNAM=taler-exchange
VERSION=${VERSION:-dadb96}

CWD=$(pwd)
OUTPUT="${OUTPUT:-/tmp}"
PKG="$TMP/package-$PRGNAM"
TMP=${TMP:-/tmp/sky}

mkdir -p "$TMP"
cd "$TMP"
rm -fr "$GIT_REPO_NAME" "$PRGNAM-$VERSION"
git clone "$GIT_REPO"
mv "$GIT_REPO_NAME" "$PRGNAM-$VERSION"

cd "$PRGNAM-$VERSION"
git checkout "$VERSION"
./bootstrap
rm -fr .git

cd "$TMP"
tar -f "$OUTPUT/$PRGNAM-$VERSION.tar.gz" -C "$TMP" -cj "$PRGNAM-$VERSION"
echo "$OUTPUT/$PRGNAM-$VERSION.tar.gz"