Automatically detect latest release

This commit is contained in:
masoud 2018-04-02 18:53:00 +04:30
parent d8689f6b9a
commit 253ba208f5

View File

@ -41,13 +41,13 @@
To install or update nvm, you can use the [install script][2] using cURL: To install or update nvm, you can use the [install script][2] using cURL:
```sh ```sh
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash curl -o- https://raw.githubusercontent.com/creationix/nvm/$(curl --silent "https://api.github.com/repos/creationix/nvm/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')/install.sh | bash
``` ```
or Wget: or Wget:
```sh ```sh
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash wget -qO- https://raw.githubusercontent.com/creationix/nvm/$(curl --silent "https://api.github.com/repos/creationix/nvm/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')/install.sh | bash
``` ```
<sub>The script clones the nvm repository to `~/.nvm` and adds the source line to your profile (`~/.bash_profile`, `~/.zshrc`, `~/.profile`, or `~/.bashrc`).</sub> <sub>The script clones the nvm repository to `~/.nvm` and adds the source line to your profile (`~/.bash_profile`, `~/.zshrc`, `~/.profile`, or `~/.bashrc`).</sub>