From ca4540c973a10d0765152790d60c57ac7512c33c Mon Sep 17 00:00:00 2001 From: Abe Fehr Date: Thu, 17 Feb 2022 00:08:12 -0500 Subject: [PATCH] Improved install script --- .gitignore | 1 + README.md | 4 ++-- build | 5 ----- build.sh | 3 +++ install.sh | 7 +++++++ 5 files changed, 13 insertions(+), 7 deletions(-) delete mode 100755 build create mode 100755 build.sh create mode 100755 install.sh diff --git a/.gitignore b/.gitignore index 6fefe6c..bc453cc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ bin .DS_Store +TODO.md \ No newline at end of file diff --git a/README.md b/README.md index a0f04e4..6d35de1 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # ⚡️ Fast nvm switcher -Is your nvm slow? This repository provides some suggestions for speeding up nvm in your shell. +Is your nvm slow? This repository provides some suggestions (and a utility) for speeding up nvm in your shell. ## Speeding up a basic installation @@ -32,7 +32,7 @@ function nvm() { For the zsh shell hook that automatically switches node versions on directory change, you can simply start by downloading the `resolve_node_version` binary to your `.nvm` folder: ```bash -(cd $HOME/.nvm/ && curl -L -O https://github.com/abejfehr/fast-nvm-switcher/releases/download/0.1.3/resolve_node_version && chmod +x $HOME/.nvm/resolve_node_version) +curl -o- https://raw.githubusercontent.com/abejfehr/fast-nvm-switcher/v0.1.4/install.sh | bash ``` And add a relatively small hook into your `.zshrc` file: diff --git a/build b/build deleted file mode 100755 index 933de0b..0000000 --- a/build +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -# deno compile --allow-read --allow-env --output ./bin/resolve_node_version ./resolve_node_version.ts - -go build -o ./bin resolve_node_version.go diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..cfc454f --- /dev/null +++ b/build.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +go build -o ./bin/ resolve_node_version.go diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..b01426c --- /dev/null +++ b/install.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +cd $NVM_DIR + +curl -L -O https://github.com/abejfehr/fast-nvm-switcher/releases/download/0.1.4/resolve_node_version + +chmod +x $NVM_DIR/resolve_node_version