mirror of
https://github.com/actions/runner-images.git
synced 2025-12-11 03:27:05 +00:00
* Move home directory vars to post-deploy scripts * Remove "export" word * Move home directory vars to post-deploy scripts * Remove "export" word * add variables via post-deployment file * remove quotes around PATH * remove quotes * Replace $HOME in /etc/environment in post-deployment script * rename variable * get rid of extra variable
19 lines
741 B
Bash
19 lines
741 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 '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
|