mirror of
https://github.com/actions/runner-images.git
synced 2026-01-04 01:03:18 +08:00
* [ubuntu] Rename build scripts * [ubuntu] Change reboot to inline shell * [ubuntu] Move disk space validation to pester tests * [ubuntu] Rename helper and tests files * [ubuntu] Changes to cleanup, post-deployment and r scripts
19 lines
753 B
Bash
19 lines
753 B
Bash
#!/bin/bash -e
|
|
################################################################################
|
|
## File: install-nvm.sh
|
|
## Desc: Install Nvm
|
|
################################################################################
|
|
|
|
export NVM_DIR="/etc/skel/.nvm"
|
|
mkdir $NVM_DIR
|
|
VERSION=$(curl -fsSL https://api.github.com/repos/nvm-sh/nvm/releases/latest | jq -r '.tag_name')
|
|
curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/$VERSION/install.sh | bash
|
|
echo 'NVM_DIR=$HOME/.nvm' | tee -a /etc/environment
|
|
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
|