From 715bb59c3b5021bbfa6e098ff7ef68e3a602528a Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Mon, 28 Dec 2015 12:52:11 -0800 Subject: [PATCH] Adapt `nvm_install_iojs_source` to support specifying `make` jobs. --- nvm.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/nvm.sh b/nvm.sh index f58b234..faf8ac7 100644 --- a/nvm.sh +++ b/nvm.sh @@ -1724,8 +1724,10 @@ nvm_install_iojs_source() { VERSION="$(nvm_strip_iojs_prefix "$1")" local PREFIXED_VERSION PREFIXED_VERSION="$(nvm_add_iojs_prefix "$VERSION")" + local NVM_MAKE_JOBS + NVM_MAKE_JOBS="$2" local ADDITIONAL_PARAMETERS - ADDITIONAL_PARAMETERS="$2" + ADDITIONAL_PARAMETERS="$3" local NVM_ARCH NVM_ARCH="$(nvm_get_arch)" @@ -1773,9 +1775,9 @@ nvm_install_iojs_source() { command tar -xzf "$tmptarball" -C "$tmpdir" && \ cd "$tmpdir/$PREFIXED_VERSION" && \ ./configure --prefix="$VERSION_PATH" $ADDITIONAL_PARAMETERS && \ - $make -j $MAKE_CXX && \ + $make -j $NVM_MAKE_JOBS ${MAKE_CXX-} && \ command rm -f "$VERSION_PATH" 2>/dev/null && \ - $make -j $MAKE_CXX install + $make -j $NVM_MAKE_JOBS ${MAKE_CXX-} install ); then return 0 else