diff options
author | Chris <[email protected]> | 2020-05-12 14:12:20 -0400 |
---|---|---|
committer | Chris <[email protected]> | 2020-05-12 14:12:20 -0400 |
commit | 8ddeebac15876a1d8a2e64ec7e18be058dd2b573 (patch) | |
tree | 905fabf2938a011a7bfdb5c4a1a40a5e105bb573 /utils | |
parent | 361a072d9ca3fa1ca97d58d2cea1dff0d6846557 (diff) |
update install node
Diffstat (limited to 'utils')
-rwxr-xr-x | utils/install.sh | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/utils/install.sh b/utils/install.sh index 53f23dd7..f4aebe93 100755 --- a/utils/install.sh +++ b/utils/install.sh @@ -3,10 +3,24 @@ set -o nounset # error when referencing undefined variable set -o errexit # exit when command fails +installnodemac() { \ + brew install node +} + +installnodeubuntu() { \ + sudo apt install nodejs +} + +installnodearch() { \ + sudo pacman -S nodejs +} installnode() { \ echo "Installing node..." - sudo curl -sL install-node.now.sh/lts | bash + [ "$(uname)" == "Darwin" ] && installnodemac + [ -n "$(uname -a | grep Ubuntu)" ] && installnodeubuntu + [ -f "/etc/arch-release" ] && installnodearch + [ "$(expr substr $(uname -s) 1 10)" == "MINGW64_NT" ] && echo "Windows not currently supported" npm i -g neovim } |