From 253ba208f5e1c6df8987ea9c25915abff973374e Mon Sep 17 00:00:00 2001 From: masoud Date: Mon, 2 Apr 2018 18:53:00 +0430 Subject: [PATCH] Automatically detect latest release --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5f18e07..c561e6b 100644 --- a/README.md +++ b/README.md @@ -41,13 +41,13 @@ To install or update nvm, you can use the [install script][2] using cURL: ```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: ```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 ``` The script clones the nvm repository to `~/.nvm` and adds the source line to your profile (`~/.bash_profile`, `~/.zshrc`, `~/.profile`, or `~/.bashrc`).