File tree Expand file tree Collapse file tree 1 file changed +6
-25
lines changed Expand file tree Collapse file tree 1 file changed +6
-25
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
+ trap abort_on_failure ERR
3
+
4
+ abort_on_failure () {
5
+ echo " Last command failed, exising"
6
+ exit 42;
7
+ }
2
8
3
9
MONGOC_VERSION=master
4
10
LIBBSON_VERSION=master
5
11
LCOV_VERSION=1.11
6
12
7
13
8
- abort_on_failure () {
9
- if [ $1 -ne 0 ]; then
10
- echo " Last command failed, exising"
11
- exit 42;
12
- fi
13
- }
14
-
15
-
16
14
sudo apt-get install gdb
17
15
mkdir tmp-lcov
18
16
pushd tmp-lcov
24
22
pushd src
25
23
if [ " $MONGOC_VERSION " = " master" ]; then
26
24
wget -O libmongoc.tar.gz https://github.com/mongodb/mongo-c-driver/archive/master.tar.gz
27
- abort_on_failure $?
28
25
else
29
26
wget -O libmongoc.tar.gz https://github.com/mongodb/mongo-c-driver/releases/download/${MONGOC_VERSION} /mongo-c-driver-${MONGOC_VERSION} .tar.gz
30
- abort_on_failure $?
31
27
fi
32
28
33
29
34
30
mkdir libmongoc
35
31
pushd libmongoc
36
32
tar zxf ../libmongoc.tar.gz --strip-components=1
37
- abort_on_failure $?
38
33
39
34
pushd src
40
35
if [ " $LIBBSON_VERSION " = " master" ]; then
41
36
wget -O libbson.tar.gz https://github.com/mongodb/libbson/archive/master.tar.gz
42
- abort_on_failure $?
43
37
else
44
38
wget -O libbson.tar.gz https://github.com/mongodb/libbson/releases/download/${LIBBSON_VERSION} /libbson-${LIBBSON_VERSION} .tar.gz
45
- abort_on_failure $?
46
39
fi
47
40
48
41
pushd libbson
49
42
tar zxf ../libbson.tar.gz --strip-components=1
50
43
51
44
./autogen.sh --enable-debug --enable-debug-symbols=full --disable-ssl --enable-trace --quiet
52
- abort_on_failure $?
53
45
popd
54
46
55
47
popd # src
56
48
57
49
./autogen.sh --enable-debug --enable-debug-symbols=full --with-libbson=bundled --disable-ssl --enable-trace --quiet
58
- abort_on_failure $?
59
-
60
- abort_on_failure $?
61
50
62
51
make -s -j2 all
63
- abort_on_failure $?
64
-
65
52
sudo make install
66
- abort_on_failure $?
67
53
68
54
popd # libmongoc
69
55
popd # src
@@ -72,13 +58,8 @@ popd # src
72
58
73
59
phpize
74
60
./configure --enable-coverage
75
- abort_on_failure $?
76
-
77
61
make all
78
- abort_on_failure $?
79
-
80
62
sudo make install
81
- abort_on_failure $?
82
63
83
64
84
65
You can’t perform that action at this time.
0 commit comments