mirror of
https://github.com/FerretDB/documentdb.git
synced 2026-11-25 11:49:53 -05:00
### Does this PR have any customer impact? No ### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc) DevOps ### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes) No ### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md)) ### Description Count "processor" instead of "core id" to determine number of cpu cores available
28 lines
935 B
Bash
Executable File
28 lines
935 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# fail if trying to reference a variable that is not set.
|
|
set -u
|
|
# exit immediately if a command exits with a non-zero status
|
|
set -e
|
|
|
|
MONGO_DRIVER_VERSION="1.16.1"
|
|
|
|
if [ "${INSTALLDESTDIR:-""}" == "" ]; then
|
|
INSTALLDESTDIR="/usr";
|
|
fi
|
|
|
|
if [ "${MAKE_PROGRAM:-""}" == "" ]; then
|
|
MAKE_PROGRAM="cmake3"
|
|
fi
|
|
|
|
pushd $INSTALL_DEPENDENCIES_ROOT
|
|
curl -s -L https://github.com/mongodb/mongo-c-driver/releases/download/$MONGO_DRIVER_VERSION/mongo-c-driver-$MONGO_DRIVER_VERSION.tar.gz | tar -C $INSTALL_DEPENDENCIES_ROOT -zx --transform="s|mongo-c-driver-$MONGO_DRIVER_VERSION|mongo-c-driver|"
|
|
cd $INSTALL_DEPENDENCIES_ROOT/mongo-c-driver/build
|
|
$MAKE_PROGRAM -DENABLE_MONGOC=OFF -DCMAKE_C_FLAGS=-fPIC -DCMAKE_INSTALL_PREFIX=$INSTALLDESTDIR ..
|
|
make clean && make -sj$(cat /proc/cpuinfo | grep "processor" | wc -l) install
|
|
popd
|
|
|
|
if [ "${CLEANUP_SETUP:-"0"}" == "1" ]; then
|
|
rm -rf $INSTALL_DEPENDENCIES_ROOT/mongo-c-driver
|
|
fi
|