Forked from PhilReinking/Bootstrap Android SDK and Phonegap
Last active
August 29, 2015 14:22
-
-
Save hardikdangar/67cb7dc1ad7812966a19 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Update Repositories | |
sudo apt-get -y update | |
sudo apt-get install -y python-software-properties python g++ make | |
sudo add-apt-repository -y ppa:chris-lea/node.js | |
sudo apt-get -y update | |
# NODE | |
sudo apt-get install -y nodejs | |
# JDK | |
sudo apt-get -y install openjdk-7-jdk | |
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 | |
export PATH=${PATH}:${JAVA_HOME}/bin | |
# ANT | |
sudo apt-get -y install ant | |
# Install Apache Server for serving /var/www to localhost:8080 | |
apt-get install -y apache2 | |
# GIT | |
sudo apt-get -y install git | |
# ANDROID SDK | |
wget http://dl.google.com/android/android-sdk_r22.6-linux.tgz | |
sudo tar -xzf /home/vagrant/android-sdk_r22.6-linux.tgz | |
sudo rm -Rf /home/vagrant/android-sdk_r22.6-linux.tgz | |
sudo chown -R vagrant:vagrant /home/vagrant/android-sdk-linux | |
echo 'Finished Downloading Android SDK' | |
export PATH=${PATH}:/home/vagrant/android-sdk-linux/tools | |
export PATH=${PATH}:/home/vagrant/android-sdk-linux/platform-tools | |
sudo apt-get -y install expect | |
# install packages, for reference see: | |
# android list sdk --all | |
# install Tools (1) | |
expect -c ' | |
set timeout -1 ; | |
spawn android update sdk -u -a -t 1; | |
expect { | |
"Do you accept the license" { exp_send "y\r" ; exp_continue } | |
eof | |
} | |
' | |
# install Platform-tools (2) | |
expect -c ' | |
set timeout -1 ; | |
spawn android update sdk -u -a -t 2; | |
expect { | |
"Do you accept the license" { exp_send "y\r" ; exp_continue } | |
eof | |
} | |
' | |
# install Build-tools (3) | |
expect -c ' | |
set timeout -1 ; | |
spawn android update sdk -u -a -t 3; | |
expect { | |
"Do you accept the license" { exp_send "y\r" ; exp_continue } | |
eof | |
} | |
' | |
# install 4.4.2 (12) a.k.a. KitKat | |
expect -c ' | |
set timeout -1 ; | |
spawn android update sdk -u -a -t 12; | |
expect { | |
"Do you accept the license" { exp_send "y\r" ; exp_continue } | |
eof | |
} | |
' | |
# Node Packages | |
sudo npm install -g phonegap@3.3.0-0.19.6 | |
# Save PATH environment permanently in bash_profile or environment | |
# touch /home/vagrant/.bash_profile | |
# echo "PATH=${PATH}" > /home/vagrant/.bash_profile | |
echo "PATH=${PATH}" > /etc/environment |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment