2015-01-19 10:55:48 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
cleanup () {
|
2016-06-27 06:52:26 +08:00
|
|
|
rm "${NVM_DIR}/versions/io.js/v0.1.2/node"
|
|
|
|
rm "${NVM_DIR}/versions/io.js/v0.1.2/iojs"
|
|
|
|
rmdir "${NVM_DIR}/versions/io.js/v0.1.2"
|
2015-01-19 10:55:48 +08:00
|
|
|
}
|
|
|
|
die () { echo $@ ; exit 1; }
|
|
|
|
|
|
|
|
. ../../../nvm.sh
|
|
|
|
|
2016-06-27 06:52:26 +08:00
|
|
|
mkdir "${NVM_DIR}/versions/io.js/v0.1.2"
|
|
|
|
touch "${NVM_DIR}/versions/io.js/v0.1.2/node"
|
|
|
|
touch "${NVM_DIR}/versions/io.js/v0.1.2/iojs"
|
2015-01-19 10:55:48 +08:00
|
|
|
|
|
|
|
nvm use iojs-v0.1.2
|
|
|
|
|
|
|
|
if command -v iojs; then
|
|
|
|
nvm_has_system_iojs
|
|
|
|
else
|
|
|
|
! nvm_has_system_iojs
|
|
|
|
fi
|
|
|
|
|
|
|
|
nvm deactivate /dev/null 2>&1
|
|
|
|
|
|
|
|
if command -v iojs; then
|
|
|
|
nvm_has_system_iojs
|
|
|
|
else
|
|
|
|
! nvm_has_system_iojs
|
|
|
|
fi
|