2014-09-22 02:14:18 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
die () { echo $@ ; exit 1; }
|
|
|
|
|
2015-01-18 01:26:52 +08:00
|
|
|
. ../../../nvm.sh
|
2014-09-22 02:14:18 +08:00
|
|
|
|
|
|
|
# Remove the stuff we're clobbering.
|
2015-01-18 01:26:52 +08:00
|
|
|
[ -e ../../../v0.9.7 ] && rm -R ../../../v0.9.7
|
|
|
|
[ -e ../../../v0.9.12 ] && rm -R ../../../v0.9.12
|
2014-09-22 02:14:18 +08:00
|
|
|
|
|
|
|
# Install from binary
|
|
|
|
nvm install 0.9.7
|
|
|
|
|
|
|
|
# Check
|
2015-01-18 01:26:52 +08:00
|
|
|
[ -d ../../../v0.9.7 ] || die "nvm install 0.9.7 didn't install"
|
2014-09-22 02:14:18 +08:00
|
|
|
|
|
|
|
nvm use 0.9.7
|
|
|
|
|
|
|
|
node --version | grep v0.9.7 > /dev/null || die "nvm use 0.9.7 failed"
|
|
|
|
|
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"
|
2014-09-22 02:14:18 +08:00
|
|
|
|
|
|
|
nvm ls 0.9 | grep v0.9.7 > /dev/null || die "nvm ls 0.9 didn't show v0.9.7"
|
|
|
|
|
2014-11-23 02:52:44 +08:00
|
|
|
nvm install 0.9.12 --reinstall-packages-from=0.9 || die "nvm install 0.9.12 --reinstall-packages-from=0.9 failed"
|
2014-09-22 02:14:18 +08:00
|
|
|
|
2015-01-18 01:26:52 +08:00
|
|
|
[ -d ../../../v0.9.12 ] || die "nvm install 0.9.12 didn't install"
|
2014-09-22 02:14:18 +08:00
|
|
|
|
|
|
|
nvm use 0.9
|
|
|
|
node --version | grep v0.9.12 > /dev/null || die "nvm ls 0.9 didn't use v0.9.12"
|
|
|
|
|
2015-06-29 15:04:59 +08:00
|
|
|
npm list --global | grep object-is > /dev/null || die "object-is isn't installed"
|
2014-09-22 02:14:18 +08:00
|
|
|
|