creationix/nvm — pull request #134 by thomasfr (2012-08-23 16:01:41+00:00)
Title: Add Standalone shell script of nvm and make sure this works properly

Added nvm standalone shell script called `nvm` which sources the `nvm.sh` as you would normally do in your bashrc or bash_profile.
To really work standalone and totally local i added a check in `nvm_ls` if the current node executable within the current PATH is wihtin the auto detected NVM_DIR. If not it will return 'N/A' and therefore no globally installed node version gets recognized as long as there is no locally installed node version within this current NVM_DIR.
After this Pull Request you could ship nvm preinstalled with your node application and use it to install/update node also locally into your application. This could be useful during development for other devs.

To make the standalone `nvm` usable from outside i also added a `which`, `root` and `bin` command.
* which returns the absolute path to the currently used node version. For example:
```
$ ./nvm which
/Users/thomas/Projects/nvm/v0.9.0/bin/node
```

* root prints the absolute path to the root of the currently used node version - the path where the bin and lib dir is. For example:
```
$ ./nvm root
/Users/thomas/Projects/nvm/v0.9.0
```

* bin prints the absolute path to the 'bin' directory of the currently used node version. For example:
```
$ ./nvm bin
/Users/thomas/Projects/nvm/v0.9.0/bin
```