Adapt `nvm_install_iojs_source` to support specifying `make` jobs.

Jordan Harband 2015-12-28 12:52:11 -08:00
parent 9b8eab3163
commit 715bb59c3b
No known key found for this signature in database
GPG Key ID: 64A196AEE0916D55
1 changed files with 5 additions and 3 deletions

8
nvm.sh
View File

@ -1724,8 +1724,10 @@ nvm_install_iojs_source() {
VERSION="$(nvm_strip_iojs_prefix "$1")" VERSION="$(nvm_strip_iojs_prefix "$1")"
local PREFIXED_VERSION local PREFIXED_VERSION
PREFIXED_VERSION="$(nvm_add_iojs_prefix "$VERSION")" PREFIXED_VERSION="$(nvm_add_iojs_prefix "$VERSION")"
local NVM_MAKE_JOBS
NVM_MAKE_JOBS="$2"
local ADDITIONAL_PARAMETERS local ADDITIONAL_PARAMETERS
ADDITIONAL_PARAMETERS="$2" ADDITIONAL_PARAMETERS="$3"
local NVM_ARCH local NVM_ARCH
NVM_ARCH="$(nvm_get_arch)" NVM_ARCH="$(nvm_get_arch)"
@ -1773,9 +1775,9 @@ nvm_install_iojs_source() {
command tar -xzf "$tmptarball" -C "$tmpdir" && \ command tar -xzf "$tmptarball" -C "$tmpdir" && \
cd "$tmpdir/$PREFIXED_VERSION" && \ cd "$tmpdir/$PREFIXED_VERSION" && \
./configure --prefix="$VERSION_PATH" $ADDITIONAL_PARAMETERS && \ ./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 && \ command rm -f "$VERSION_PATH" 2>/dev/null && \
$make -j $MAKE_CXX install $make -j $NVM_MAKE_JOBS ${MAKE_CXX-} install
); then ); then
return 0 return 0
else else