2015-01-26 04:00:52 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
2016-05-26 14:48:15 +08:00
|
|
|
. ../common.sh
|
|
|
|
|
2015-01-26 04:00:52 +08:00
|
|
|
die () { echo $@ ; exit 1; }
|
|
|
|
|
|
|
|
. ../../nvm.sh
|
|
|
|
|
|
|
|
NVM_TEST_VERSION="v1.0.0"
|
|
|
|
NVM_PREFIXED_TEST_VERSION="iojs-$NVM_TEST_VERSION"
|
|
|
|
|
|
|
|
# Remove the stuff we're clobbering.
|
|
|
|
[ -e ../../versions/io.js/$NVM_TEST_VERSION ] && rm -R ../../versions/io.js/$NVM_TEST_VERSION
|
|
|
|
|
|
|
|
# Install from source
|
2016-05-26 14:48:15 +08:00
|
|
|
(watch nvm install -s $NVM_PREFIXED_TEST_VERSION) || die "'nvm install -s $NVM_PREFIXED_TEST_VERSION' failed"
|
2015-01-26 04:00:52 +08:00
|
|
|
|
|
|
|
# Check
|
|
|
|
[ -d ../../versions/io.js/$NVM_TEST_VERSION ]
|
|
|
|
nvm run $NVM_PREFIXED_TEST_VERSION --version | grep $NVM_TEST_VERSION || "'nvm run $NVM_PREFIXED_TEST_VERSION --version | grep $NVM_TEST_VERSION' failed"
|
|
|
|
|