github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/scripts/vagrant-linux-unpriv-ui.sh (about) 1 #!/usr/bin/env bash 2 3 export NODE_VERSION=14.19.2 4 5 # Install NVM for simple node.js version management 6 curl -sSL --fail -o- https://raw.githubusercontent.com/creationix/nvm/v0.36.0/install.sh | bash 7 8 # This enables NVM without a logout/login 9 export NVM_DIR="${HOME}/.nvm" 10 # shellcheck source=/dev/null 11 [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm 12 13 # Install Node, Ember CLI, and Phantom for UI development 14 # Use exact full version version (e.g. not 12) for reproducibility purposes 15 nvm install "${NODE_VERSION}" 16 nvm alias default "${NODE_VERSION}" 17 18 # Remove any other version of node installed 19 find ~/.nvm/versions/node -not -name "v${NODE_VERSION}" -depth 1 -exec rm -rf {} \; 20 21 npm install -g ember-cli 22 23 # Install Yarn for front-end dependency management 24 curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.22.5