blob: b9487934e14f4189b0e3b4cb4e1f71484e90bd91 (
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
#!/bin/bash
LIBGIT2SHA=`cat ./libgit2_hash.txt`
SHORTSHA=${LIBGIT2SHA:0:7}
if [[ -d external/libgit2/build ]]
then
if [[ -n $(ls libgit2-${SHORTSHA}.*) ]]
then
exit 0
fi
fi
rm -rf external/libgit2/build
mkdir external/libgit2/build
pushd external/libgit2/build
export _BINPATH=`pwd`
cmake -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
-DBUILD_CLAR:BOOL=OFF \
-DUSE_SSH=ON \
-DENABLE_TRACE=ON \
-DLIBGIT2_FILENAME=git2-$SHORTSHA \
-DCMAKE_OSX_ARCHITECTURES="i386" \
-DCMAKE_SKIP_RPATH=TRUE
..
cmake --build .
popd
OS=`uname`
ARCH=`uname -m`
if [ $OS == "Darwin" ]; then
PKGPATH="./mac"
LIBEXT="dylib"
else
exit 0
fi
git rm $PKGPATH/*
mkdir -p $PKGPATH
cp external/libgit2/build/libgit2-$SHORTSHA.$LIBEXT $PKGPATH/
exit $?
|