Last active
November 30, 2015 18:35
-
-
Save ninetails/cc854e1a3f5729027ba2 to your computer and use it in GitHub Desktop.
Fatec akademie
This file contains hidden or 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 | |
ANDROID_SDK_FILENAME=android-sdk_r24-linux.tgz | |
ANDROID_SDK=http://dl.google.com/android/$ANDROID_SDK_FILENAME | |
#sudo apt-get install python-software-properties | |
#sudo add-apt-repository ppa:webupd8team/java | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 | |
sudo echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' >> /etc/apt/sources.list.d/mongodb.list | |
# brackets | |
# sudo add-apt-repository ppa:webupd8team/brackets | |
# Sublime Text 3 | |
sudo add-apt-repository ppa:webupd8team/sublime-text-3 | |
# to allow vagrant to activate the X-server | |
sudo cp /etc/X11/Xwrapper.config /etc/X11/Xwrapper.config.bak | |
sudo sh -c "sed 's/^allowed_users=.*/allowed_users=anybody/' < /etc/X11/Xwrapper.config.bak > /etc/X11/Xwrapper.config" | |
# android-tools-adb | |
apt-get update -qq | |
apt-get install -y -qq xfce4 xfce4-terminal virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11 npm git openjdk-7-jdk ant expect mongodb-org libcap2-bin xfce4-terminal firefox sublime-text-installer | |
sudo VBoxClient-all | |
npm install -g n | |
n stable | |
sudo setcap cap_net_bind_service=+ep /usr/local/bin/node | |
curl -O $ANDROID_SDK | |
tar -xzvf $ANDROID_SDK_FILENAME | |
sudo chown -R vagrant:vagrant android-sdk-linux/ | |
echo "ANDROID_HOME=~/android-sdk-linux" >> /home/vagrant/.bashrc | |
echo "export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-i386" >> /home/vagrant/.bashrc | |
echo "PATH=~/android-sdk-linux/tools:~/android-sdk-linux/platform-tools:\$PATH" >> /home/vagrant/.bashrc | |
npm install -g cordova ionic stylus bower gulp babel browserify nodemon | |
expect -c ' | |
set timeout -1 ; | |
spawn /home/vagrant/android-sdk-linux/tools/android update sdk -u --all --filter platform-tool,android-22,build-tools-21.1.1 | |
expect { | |
"Do you accept the license" { exp_send "y\r" ; exp_continue } | |
eof | |
} | |
' | |
cd ~ | |
git clone https://github.com/ninetails/fatec-akademie.git | |
cd fatec-akademie | |
npm install |
This file contains hidden or 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
$init = <<SCRIPT | |
sudo /home/vagrant/android-sdk-linux/platform-tools/adb kill-server | |
sudo /home/vagrant/android-sdk-linux/platform-tools/adb start-server | |
sudo /home/vagrant/android-sdk-linux/platform-tools/adb devices | |
SCRIPT | |
Vagrant.configure("2") do |config| | |
# Virtualbox | |
config.vm.provider "virtualbox" do |v| | |
v.gui = true | |
v.customize ["modifyvm", :id, "--cpus", 1] | |
v.customize ["modifyvm", :id, "--memory", 2048] | |
v.customize ["modifyvm", :id, "--cpuexecutioncap", 50] | |
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] | |
v.customize ["modifyvm", :id, "--natdnsproxy1", "on"] | |
v.customize ["modifyvm", :id, "--usb", "on"] | |
v.customize ["usbfilter", "add", "0", "--target", :id, "--name", "android", "--vendorid", "0x18d1"] | |
v.customize ["setextradata", :id, "VBoxInternal/Devices/ahci/0/LUN#[0]/Config/IgnoreFlush", "1"] | |
end | |
config.vm.box = "utopic32" | |
config.vm.box_url = "https://cloud-images.ubuntu.com/vagrant/utopic/current/utopic-server-cloudimg-i386-vagrant-disk1.box" | |
config.vm.hostname = "ionic.dev" | |
config.vm.provision :shell, path: "bootstrap.sh" | |
config.vm.provision :shell, run: "always", inline: $init | |
config.vm.network "forwarded_port", guest: 80, host: 80 | |
config.vm.network "forwarded_port", guest: 3000, host: 3000 | |
config.vm.network "forwarded_port", guest: 8080, host: 8080 | |
config.vm.network "forwarded_port", guest: 8100, host: 8100 | |
config.vm.network "forwarded_port", guest: 35729, host: 35729 | |
config.vm.network :private_network, ip: '192.168.2.2' | |
config.vm.synced_folder '.', '/vagrant', id: "vagrant-root", nfs: true, owner: "vagrant", group: "vagrant", mount_options: ["dmode=777,fmode=666"] | |
if Vagrant.has_plugin?("vagrant-timezone") | |
config.timezone.value = "America/Sao_Paulo" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment