2014-11-22 09:51:49 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
2016-11-04 13:15:18 +08:00
|
|
|
\. ../../../nvm.sh
|
2018-06-14 01:38:19 +08:00
|
|
|
\. ../../common.sh
|
2014-11-22 09:51:49 +08:00
|
|
|
|
2018-06-14 01:38:19 +08:00
|
|
|
make_fake_node v0.0.2
|
|
|
|
make_fake_node v0.0.20
|
|
|
|
make_fake_node v0.12.0
|
2016-06-27 06:52:26 +08:00
|
|
|
|
2016-11-07 03:34:36 +08:00
|
|
|
die () { echo "$@" ; exit 1; }
|
2014-11-22 09:51:49 +08:00
|
|
|
|
|
|
|
# The result should contain only the appropriate version numbers.
|
|
|
|
|
2014-12-20 08:31:37 +08:00
|
|
|
nvm which 0.0.2 || die "v0.0.2 not found"
|
|
|
|
NVM_BIN="$(nvm which 0.0.2)"
|
|
|
|
[ "_$NVM_BIN" = "_$(nvm_version_path v0.0.2)/bin/node" ] \
|
|
|
|
|| die "'nvm which 0.0.2' did not contain the correct path: got '$NVM_BIN'"
|
|
|
|
|
|
|
|
nvm which 0.0.20 || die "v0.0.20 not found"
|
|
|
|
NVM_BIN="$(nvm which 0.0.20)"
|
|
|
|
[ "_$NVM_BIN" = "_$(nvm_version_path v0.0.20)/bin/node" ] \
|
|
|
|
|| die "'nvm which 0.20.0' did not contain the correct path: got '$NVM_BIN'"
|
|
|
|
|
|
|
|
nvm which 0.12.0 || die "v0.0.20 not found"
|
|
|
|
NVM_BIN="$(nvm which 0.12.0)"
|
|
|
|
[ "_$NVM_BIN" = "_$(nvm_version_path v0.12.0)/bin/node" ] \
|
|
|
|
|| die "'nvm which 0.12.0' did not contain the correct path: got '$NVM_BIN'"
|