aboutsummaryrefslogtreecommitdiff
path: root/taler-exchange/download.sh
diff options
context:
space:
mode:
Diffstat (limited to 'taler-exchange/download.sh')
-rwxr-xr-xtaler-exchange/download.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/taler-exchange/download.sh b/taler-exchange/download.sh
new file mode 100755
index 0000000..31d62bd
--- /dev/null
+++ b/taler-exchange/download.sh
@@ -0,0 +1,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"