33 lines
1.1 KiB
Plaintext
33 lines
1.1 KiB
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
die () { echo $@ ; exit 1; }
|
||
|
|
||
|
. ../../../nvm.sh
|
||
|
|
||
|
# Remove the stuff we're clobbering.
|
||
|
[ -e ../../../versions/io.js/v1.0.0 ] && rm -R ../../../versions/io.js/v1.0.0
|
||
|
[ -e ../../../versions/io.js/v1.0.1 ] && rm -R ../../../versions/io.js/v1.0.1
|
||
|
|
||
|
# Install from binary
|
||
|
nvm install iojs-v1.0.0
|
||
|
|
||
|
# Check
|
||
|
[ -d ../../../versions/io.js/v1.0.0 ] || die "nvm install iojs-v1.0.0 didn't install"
|
||
|
|
||
|
node --version | grep v1.0.0 > /dev/null || die "nvm install didn't use iojs-v1.0.0"
|
||
|
|
||
|
npm install -g is-nan@1.0.1 || die "npm install -g is-nan failed"
|
||
|
npm list --global | grep is-nan > /dev/null || die "is-nan isn't installed"
|
||
|
|
||
|
nvm ls iojs-1 | grep iojs-v1.0.0 > /dev/null || die "nvm ls iojs-1 didn't show iojs-v1.0.0"
|
||
|
|
||
|
nvm install iojs-v1.0.1 --reinstall-packages-from=iojs-1.0.0 || die "nvm install iojs-v1.0.1 --reinstall-packages-from=iojs-1.0.0 failed"
|
||
|
|
||
|
[ -d ../../../versions/io.js/v1.0.1 ] || die "nvm install iojs-v1.0.1 didn't install"
|
||
|
|
||
|
nvm use iojs-1
|
||
|
node --version | grep v1.0.1 > /dev/null || die "nvm use iojs-1 didn't use v1.0.1"
|
||
|
|
||
|
npm list --global | grep is-nan > /dev/null || die "is-nan isn't installed"
|
||
|
|