diff options
| author | Carlos Martín Nieto <[email protected]> | 2014-06-03 18:35:09 +0200 |
|---|---|---|
| committer | Carlos Martín Nieto <[email protected]> | 2014-06-03 18:35:09 +0200 |
| commit | 064629428296914c4a5875f8da6b557d55f82930 (patch) | |
| tree | dc7123f06956cdaf851674f8066c11fbfa75c11c /script/build-libgit2-static.sh | |
| parent | 29a983b68f6dc75271d24e33fc5b3eb7801ce986 (diff) | |
Move some logic into the Makefile
This should provide a nice compromise between the scripts and comon
commands.
Diffstat (limited to 'script/build-libgit2-static.sh')
| -rwxr-xr-x | script/build-libgit2-static.sh | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/script/build-libgit2-static.sh b/script/build-libgit2-static.sh index c896de8..04c649d 100755 --- a/script/build-libgit2-static.sh +++ b/script/build-libgit2-static.sh @@ -2,21 +2,19 @@ set -ex +VENDORED_PATH=vendor/libgit2 + # 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 +if [ ! -d $VENDORED_PATH ]; then + git clone --depth 1 --single-branch git://github.com/libgit2/libgit2 $VENDORED_PATH fi -cd libgit2 +cd $VENDORED_PATH + cmake -DTHREADSAFE=ON \ -DBUILD_CLAR=OFF \ -DBUILD_SHARED_LIBS=OFF \ - -DCMAKE_INSTALL_PREFIX=$PWD/install \ + -DCMAKE_INSTALL_PREFIX=../install \ . make install |
