-
Notifications
You must be signed in to change notification settings - Fork 10
/
vendor.sh
27 lines (24 loc) · 1 KB
/
vendor.sh
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
#!/bin/bash
set -eu
VERSION="1.27.2"
rm -rf mongo-c-driver
git clone [email protected]:mongodb/mongo-c-driver.git
pushd mongo-c-driver
git checkout $VERSION
python build/calc_release_version.py > VERSION_CURRENT
mkdir cmake-build && cd cmake-build
cmake -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DENABLE_MONGOC=OFF ..
popd
rm -r bsonjs/bson
rm -r bsonjs/jsonsl
rm -r bsonjs/common
rsync -r mongo-c-driver/src/libbson/src/bson/*.[hc] bsonjs/bson/
rsync -r mongo-c-driver/src/libbson/src/jsonsl/*.[hc] bsonjs/jsonsl/
rsync -r mongo-c-driver/src/libbson/src/jsonsl/LICENSE bsonjs/jsonsl/
rsync -r mongo-c-driver/src/common/*.[hc] bsonjs/common/
rsync -r mongo-c-driver/cmake-build/src/common/*.[hc] bsonjs/common/
rsync -r mongo-c-driver/cmake-build/src/libbson/src/bson/*.[hc] bsonjs/bson/
# Ignore autogenerated bson-config.h
git diff -- bsonjs/bson/bson-config.h | tee
echo "**** Review libbson's autogenerated src/bson/bson-config.h (above) for newly added (or removed) macros ****"
git checkout -- bsonjs/bson/bson-config.h