mirror of
https://github.com/mempool/mempool.git
synced 2025-04-11 13:31:21 +02:00
Merge pull request #1979 from Emzy/ops/cpu-count
Limit make to max cpus in prod install
This commit is contained in:
commit
96007509b5
@ -6,11 +6,13 @@ case `uname -s` in
|
||||
|
||||
FreeBSD)
|
||||
OS=FreeBSD
|
||||
NPROC=$(sysctl hw.ncpu | awk '{print $2}')
|
||||
;;
|
||||
|
||||
Linux)
|
||||
if [ "$(grep -Ei 'debian|buntu|mint' /etc/*release)" ]; then
|
||||
OS=Debian
|
||||
NPROC=$(nproc --all)
|
||||
else
|
||||
echo "Your distribution of Linux is not yet supported by this installation script"
|
||||
exit 1
|
||||
@ -964,7 +966,7 @@ if [ "${BITCOIN_INSTALL}" = ON ];then
|
||||
echo "[*] Building Bitcoin from source repo"
|
||||
osSudo "${BITCOIN_USER}" sh -c "cd ${BITCOIN_REPO_NAME} && ./autogen.sh --quiet"
|
||||
osSudo "${BITCOIN_USER}" sh -c "cd ${BITCOIN_REPO_NAME} && MAKE=gmake CC=cc CXX=c++ CPPFLAGS=-I/usr/local/include ./configure --with-gui=no --disable-wallet --disable-tests"
|
||||
osSudo "${BITCOIN_USER}" sh -c "cd ${BITCOIN_REPO_NAME} && gmake -j48"
|
||||
osSudo "${BITCOIN_USER}" sh -c "cd ${BITCOIN_REPO_NAME} && gmake -j${NPROC}"
|
||||
|
||||
echo "[*] Installing Bitcoin binaries into OS"
|
||||
osSudo "${ROOT_USER}" sh -c "cd ${BITCOIN_HOME}/${BITCOIN_REPO_NAME} && gmake install"
|
||||
@ -1009,7 +1011,7 @@ if [ "${ELEMENTS_INSTALL}" = ON ];then
|
||||
echo "[*] Building Elements from source repo"
|
||||
osSudo "${ELEMENTS_USER}" sh -c "cd ${ELEMENTS_REPO_NAME} && ./autogen.sh --quiet"
|
||||
osSudo "${ELEMENTS_USER}" sh -c "cd ${ELEMENTS_REPO_NAME} && MAKE=gmake CC=cc CXX=c++ CPPFLAGS=-I/usr/local/include ./configure --with-gui=no --disable-wallet --disable-tests"
|
||||
osSudo "${ELEMENTS_USER}" sh -c "cd ${ELEMENTS_REPO_NAME} && gmake -j48"
|
||||
osSudo "${ELEMENTS_USER}" sh -c "cd ${ELEMENTS_REPO_NAME} && gmake -j${NPROC}"
|
||||
|
||||
echo "[*] Installing Elements binaries into OS"
|
||||
osSudo "${ROOT_USER}" sh -c "cd ${ELEMENTS_HOME}/${ELEMENTS_REPO_NAME} && gmake install"
|
||||
|
Loading…
x
Reference in New Issue
Block a user