forked from SamClayton/ionic-box
-
Notifications
You must be signed in to change notification settings - Fork 1
/
bootstrap.sh
53 lines (41 loc) · 1.84 KB
/
bootstrap.sh
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
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/usr/bin/env bash
ANDROID_SDK_FILENAME=android-sdk_r24.4.1-linux.tgz
ANDROID_SDK=http://dl.google.com/android/$ANDROID_SDK_FILENAME
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get update
# update from Ubuntu 10.04.3 to 10.04.4 or newer LTS releases
sudo apt-get -y dist-upgrade
sudo apt-get install -y git openjdk-7-jdk ant expect nodejs
# install 32-bit dependencies of Android build-tools
sudo apt-get install -y lib32gcc1 libc6-i386 lib32z1 lib32stdc++6 lib32ncurses5 lib32gomp1 lib32z1-dev
sudo ln -s /usr/bin/nodejs /usr/bin/node
curl -O $ANDROID_SDK
tar -xzvf $ANDROID_SDK_FILENAME
sudo chown -R vagrant android-sdk-linux/
sudo mkdir android-sdk-linux/temp
sudo chown -R vagrant android-sdk-linux/temp
echo "ANDROID_HOME=~/android-sdk-linux" >> /home/vagrant/.bashrc
echo "export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64" >> /home/vagrant/.bashrc
echo "PATH=\$PATH:~/android-sdk-linux/tools:~/android-sdk-linux/platform-tools" >> /home/vagrant/.bashrc
sudo npm install -g cordova ionic gulp bower nodemon
# add gradle 2.2.1?
sudo chown -R vagrant /usr/local/lib/node_modules
# allow to uninstall/reinstall ionic w/o root
sudo chown -R vagrant /usr/local/bin/ionic
#add gradle install here
sudo apt-get autoremove
expect -c '
set timeout -1 ;
spawn /home/vagrant/android-sdk-linux/tools/android update sdk --no-ui -u --all --filter platform-tool,android-22,android-23,build-tools-22.0.1,extra
expect {
"Do you accept the license" { exp_send "y\r" ; exp_continue }
eof
}
'
# install mongodb
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
sudo apt-get update
sudo apt-get install -y mongodb-org
# install Heroku CLI
wget -O- https://toolbelt.heroku.com/install-ubuntu.sh | sh