Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
33 lines (24 sloc) 1.03 KB
#!/usr/bin/env bash
export DEBIAN_FRONTEND=noninteractive
apt-get update > /dev/null
apt-get -y install build-essential git-core unzip xvfb firefox chromium-browser ruby1.9.1 ruby1.9.1-dev libxml2-dev libxslt1-dev
gem install bundler pry
mkdir -p /home/vagrant/downloads
mkdir -p /home/vagrant/bin
chown -R vagrant:vagrant /home/vagrant/bin
if [ "$GUI" == "headless" ]; then
echo "GUI is already set to headless"
else
echo "export GUI=\"headless\"" >> /home/vagrant/.profile
echo "export GUI=\"headless\"" >> /home/vagrant/.zshenv
fi
if [ -f "/home/vagrant/bin/chromedriver" ]; then
echo "Chromedriver already installed"
else
echo "export PATH=\"/home/vagrant/bin:$PATH\"" >> /home/vagrant/.profile
echo "export PATH=\"/home/vagrant/bin:$PATH\"" >> /home/vagrant/.zshenv
wget -q http://chromedriver.googlecode.com/files/chromedriver_linux64_21.0.1180.4.zip
unzip chromedriver_linux64_21.0.1180.4.zip
chown vagrant:vagrant chromedriver && mv chromedriver /home/vagrant/bin/chromedriver
fi
su -c 'cd /vagrant && bundle' vagrant