forked from TwilioDevEd/api-snippets
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall_travis_dependencies.sh
More file actions
executable file
·39 lines (31 loc) · 1.04 KB
/
install_travis_dependencies.sh
File metadata and controls
executable file
·39 lines (31 loc) · 1.04 KB
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
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
languages=""
if [ -n "$SNIPPET_LANGUAGE" ]; then
echo "Installing dependencies for: ${SNIPPET_LANGUAGE//:/,}"
languages="$SNIPPET_LANGUAGE"
fi
# Install common dependencies
jdk_switcher use oraclejdk8
sudo apt-get install -y --force-yes build-essential ca-certificates git curl
if [[ $languages == *"java"* ]]; then
sudo add-apt-repository ppa:cwchien/gradle -y
sudo apt-get update
sudo apt-get install -y --force-yes gradle
fi
if [[ $languages == *"node"* ]]; then
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y --force-yes nodejs
sudo npm install -g n
sudo n lts
". $HOME/.nvm/nvm.sh"
nvm install stable
nvm use stable
fi
if [[ $languages == *"python"* ]]; then
sudo apt-get install -y --force-yes python-dev python-pip
sudo pip install --upgrade pip wheel --quiet
fi
if [[ $languages == *"php"* ]]; then
sudo apt-get install -y --force-yes php5-cli git php5-curl
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
fi