summaryrefslogtreecommitdiff
path: root/scripts/node/install.sh
blob: 1edc2c91d91d034d728848dc1b30b896e9a3c245 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env bash

set -e
set -o pipefail

mapbox_time "checkout_mason" \
git submodule update --init .mason

export PATH="`pwd`/.mason:${PATH}" MASON_DIR="`pwd`/.mason"

if [ ${TRAVIS_OS_NAME} == "linux" ]; then
    mapbox_time "install_mesa" \
    mason install mesa 10.4.3
fi

if [ ! -d ~/.nvm ]; then
    curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.28.0/install.sh | bash
fi

source ~/.nvm/nvm.sh

mapbox_time $NODE_VERSION \
nvm install $NODE_VERSION

nvm alias default $NODE_VERSION

node --version
npm --version