updated install-nodejs.sh

This commit is contained in:
marvzhang
2020-02-11 09:36:34 +08:00
parent 5b0e69e172
commit 7b34e47efe
2 changed files with 427 additions and 1 deletions

View File

@@ -1,7 +1,8 @@
#!/bin/env bash
# install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash
BASE_DIR=`dirname $0`
/bin/bash ${BASE_DIR}/install-nvm.sh
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm