summaryrefslogtreecommitdiff
path: root/script/build-libgit2-static.sh
blob: c896de873b3970e87acb27c0745ff95b6fe0b7dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

set -ex

# Make sure we have the latest libgit2
if [ -d libgit2 ]; then
    cd libgit2
    git fetch origin development
    git checkout FETCH_HEAD
    cd ..
else
    git clone --depth 1 --single-branch git://github.com/libgit2/libgit2 libgit2
fi

cd libgit2
cmake -DTHREADSAFE=ON \
      -DBUILD_CLAR=OFF \
      -DBUILD_SHARED_LIBS=OFF \
      -DCMAKE_INSTALL_PREFIX=$PWD/install \
      .

make install