2012-10-11 07:17:09 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
2013-05-04 00:46:21 +08:00
|
|
|
mkdir -p ../../v0.2.3
|
|
|
|
|
|
|
|
die () { echo $@ ; exit 1; }
|
|
|
|
|
|
|
|
[[ $PATH != *v0.2.3/*/bin* ]] || echo "WARNING: Unexpectedly found v0.2.3 already active" >&2
|
|
|
|
|
2012-10-11 07:17:09 +08:00
|
|
|
. ../../nvm.sh
|
2013-05-04 00:46:21 +08:00
|
|
|
nvm use v0.2.3 &&
|
|
|
|
[[ $PATH == *v0.2.3/*/bin* ]] || die "Failed to activate v0.2.3"
|
|
|
|
|
2012-10-11 07:17:09 +08:00
|
|
|
nvm deactivate &&
|
2013-05-04 00:46:21 +08:00
|
|
|
[[ $PATH != *v0.2.3/*/bin* ]] || die "Failed to deactivate v0.2.3"
|