Skip to content

Commit af36163

Browse files
committed
Changed nvm installation only if not already installed
1 parent 5a25843 commit af36163

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

install.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,12 @@ sudo apt-get update
5454
sudo apt-get install -y xclip
5555

5656
# NPM
57-
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
58-
export NVM_DIR="${XDG_CONFIG_HOME}/nvm"
59-
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
60-
nvm install 16.15.1
57+
if ! command -v npm > /dev/null ; then
58+
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
59+
export NVM_DIR="${XDG_CONFIG_HOME}/nvm"
60+
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
61+
nvm install 16.15.1
62+
fi
6163

6264
# NEOVIM
6365
wget ${NEOVIM_INSTALLER}

0 commit comments

Comments
 (0)