commit
ec2327fddd
13
nvm.sh
13
nvm.sh
|
@ -114,8 +114,17 @@ nvm()
|
||||||
nvm use $VERSION
|
nvm use $VERSION
|
||||||
if ! which npm ; then
|
if ! which npm ; then
|
||||||
echo "Installing npm..."
|
echo "Installing npm..."
|
||||||
# TODO: if node version 0.2.x add npm_install=0.2.19 before sh
|
if [[ "`expr match $VERSION '\(^v0\.1\.\)'`" != '' ]]; then
|
||||||
curl http://npmjs.org/install.sh | clean=yes sh
|
echo "npm requires node v0.2.3 or higher"
|
||||||
|
elif [[ "`expr match $VERSION '\(^v0\.2\.\)'`" != '' ]]; then
|
||||||
|
if [[ "`expr match $VERSION '\(^v0\.2\.[0-2]$\)'`" != '' ]]; then
|
||||||
|
echo "npm requires node v0.2.3 or higher"
|
||||||
|
else
|
||||||
|
curl http://npmjs.org/install.sh | clean=yes npm_install=0.2.19 sh
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
curl http://npmjs.org/install.sh | clean=yes sh
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "nvm: install $VERSION failed!"
|
echo "nvm: install $VERSION failed!"
|
||||||
|
|
Loading…
Reference in New Issue