summaryrefslogtreecommitdiff
path: root/script/install-libgit2.sh
diff options
context:
space:
mode:
authorCarlos Martín Nieto <[email protected]>2015-08-31 19:58:29 +0200
committerCarlos Martín Nieto <[email protected]>2015-08-31 19:58:29 +0200
commit6d3a3499f1639a6272e334f9f74b1e0cf6b0bb49 (patch)
tree04b27dfdf1faadcaff6ca40fa27d8edd690045d1 /script/install-libgit2.sh
parent157593f38da780c4f6cb6dc61275b9b36a3327bf (diff)
parent4090c401c8bf3f062e898f75bde01e2ef27b3911 (diff)
Merge branch 'master-v23'
Diffstat (limited to 'script/install-libgit2.sh')
-rwxr-xr-xscript/install-libgit2.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/script/install-libgit2.sh b/script/install-libgit2.sh
new file mode 100755
index 0000000..9bf6b37
--- /dev/null
+++ b/script/install-libgit2.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+#
+# Install libgit2 to git2go in dynamic mode on Travis
+#
+
+set -ex
+
+# We don't want to build libgit2 on the next branch, as we carry a
+# submodule with the exact version we support
+if [ "x$TRAVIS_BRANCH" = "xnext" ]; then
+ exit 0
+fi
+
+cd "${HOME}"
+wget -O libgit2-0.23.1.tar.gz https://github.com/libgit2/libgit2/archive/v0.23.1.tar.gz
+tar -xzvf libgit2-0.23.1.tar.gz
+cd libgit2-0.23.1 && mkdir build && cd build
+cmake -DTHREADSAFE=ON -DBUILD_CLAR=OFF -DCMAKE_BUILD_TYPE="RelWithDebInfo" .. && make && sudo make install
+sudo ldconfig
+cd "${TRAVIS_BUILD_DIR}"