mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-05-10 22:31:51 +00:00
Added support for FreeBSD
This commit is contained in:
parent
e475d7e7ab
commit
8015788d27
8
nvm.sh
8
nvm.sh
@ -14,6 +14,10 @@ fi
|
||||
# This fixes the "zsh: no matches found" errors
|
||||
unsetopt nomatch 2>/dev/null
|
||||
|
||||
# Use gmake when available to support FreeBSD
|
||||
MAKE_BIN='make'
|
||||
command -v gmake >/dev/null 2>&1 && MAKE_BIN='gmake'
|
||||
|
||||
# Expand a version using the version cache
|
||||
nvm_version()
|
||||
{
|
||||
@ -140,9 +144,9 @@ nvm()
|
||||
tar -xzf "node-$VERSION.tar.gz" && \
|
||||
cd "node-$VERSION" && \
|
||||
./configure --prefix="$NVM_DIR/$VERSION" $ADDITIONAL_PARAMETERS && \
|
||||
make && \
|
||||
$MAKE_BIN && \
|
||||
rm -f "$NVM_DIR/$VERSION" 2>/dev/null && \
|
||||
make install
|
||||
$MAKE_BIN install
|
||||
)
|
||||
then
|
||||
nvm use $VERSION
|
||||
|
Loading…
Reference in New Issue
Block a user