2015-01-14 09:52:18 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
die () { echo $@ ; exit 1; }
|
|
|
|
|
2016-05-09 13:21:33 +08:00
|
|
|
. ../../nvm.sh
|
2015-01-14 09:52:18 +08:00
|
|
|
|
|
|
|
# Remove the stuff we're clobbering.
|
2016-06-27 06:52:26 +08:00
|
|
|
[ -e "${NVM_DIR}/versions/io.js/v1.0.0" ] && rm -R "${NVM_DIR}/versions/io.js/v1.0.0"
|
|
|
|
[ -e "${NVM_DIR}/versions/io.js/v1.0.1" ] && rm -R "${NVM_DIR}/versions/io.js/v1.0.1"
|
2015-01-14 09:52:18 +08:00
|
|
|
|
|
|
|
# Install from binary
|
|
|
|
nvm install iojs-v1.0.0
|
|
|
|
|
|
|
|
# Check
|
2016-06-27 06:52:26 +08:00
|
|
|
[ -d "${NVM_DIR}/versions/io.js/v1.0.0" ] || die "nvm install iojs-v1.0.0 didn't install"
|
2015-01-14 09:52:18 +08:00
|
|
|
|
|
|
|
node --version | grep v1.0.0 > /dev/null || die "nvm install didn't use iojs-v1.0.0"
|
|
|
|
|
2015-06-29 15:04:59 +08:00
|
|
|
npm install -g object-is@0.0.0 || die "npm install -g object-is failed"
|
|
|
|
npm list --global | grep object-is > /dev/null || die "object-is isn't installed"
|
2015-01-14 09:52:18 +08:00
|
|
|
|
|
|
|
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"
|
|
|
|
|
2016-06-27 06:52:26 +08:00
|
|
|
[ -d "${NVM_DIR}/versions/io.js/v1.0.1" ] || die "nvm install iojs-v1.0.1 didn't install"
|
2015-01-14 09:52:18 +08:00
|
|
|
|
|
|
|
nvm use iojs-1
|
|
|
|
node --version | grep v1.0.1 > /dev/null || die "nvm use iojs-1 didn't use v1.0.1"
|
|
|
|
|
2015-06-29 15:04:59 +08:00
|
|
|
npm list --global | grep object-is > /dev/null || die "object-is isn't installed"
|