From 6ea383db2430f169b3f3dccbf4f732661327f0b2 Mon Sep 17 00:00:00 2001 From: Stefan Imhoff Date: Sun, 28 Nov 2021 11:39:03 +0100 Subject: [PATCH] chore(nvm): add install script for nvm --- setup/init.sh | 3 +++ setup/nvm.sh | 14 ++++++++++++++ 2 files changed, 17 insertions(+) create mode 100755 setup/nvm.sh diff --git a/setup/init.sh b/setup/init.sh index 1738c3f..b0dd262 100644 --- a/setup/init.sh +++ b/setup/init.sh @@ -1,6 +1,9 @@ # Installing Homebrew packages source ./brew.sh +# Installing Node.js +source ./nvm.sh + # Installing global Node.js modules source ./npm.sh diff --git a/setup/nvm.sh b/setup/nvm.sh new file mode 100755 index 0000000..d81c58b --- /dev/null +++ b/setup/nvm.sh @@ -0,0 +1,14 @@ + #!/bin/sh + + # Manual install of nvm +git clone https://github.com/creationix/nvm.git ~/.nvm +cd ~/.nvm +git checkout `git describe --abbrev=0 --tags` +cd ~/.dotfiles/ + +# Reload nvm into this environment +export NVM_DIR="$HOME/.nvm/" +[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm + +nvm install stable +nvm alias default stable