Files
runner-images/images/linux/scripts/installers/nvm.sh
Dibir Magomedsaygitov 875891b86b [Ubuntu] Migrate missing tools tests to Pester (#2374)
* add missing tests

* fix naming and nvm test

* fix containers test and bring pwsh test back

* remove pwsh test

* small fix
2020-12-31 10:00:43 +03:00

19 lines
755 B
Bash

#!/bin/bash -e
################################################################################
## File: nvm.sh
## Desc: Installs Nvm
################################################################################
export NVM_DIR="/etc/skel/.nvm"
mkdir $NVM_DIR
VERSION=$(curl -s https://api.github.com/repos/nvm-sh/nvm/releases/latest | jq -r '.tag_name')
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/$VERSION/install.sh | bash
echo 'export NVM_DIR=$HOME/.nvm' | tee -a /etc/skel/.bash_profile
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm' | tee -a /etc/skel/.bash_profile
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
invoke_tests "Tools" "nvm"
# set system node.js as default one
nvm alias default system