From f7f4dab49f8d5c750e36870f78009ff1fb6df2f5 Mon Sep 17 00:00:00 2001 From: Toby Oxborrow Date: Mon, 14 Sep 2015 18:29:24 +0800 Subject: Fix vagrant provision * Correct path to activate * More robust .bashrc editing * Git ignore .vagrant directory --- Vagrantfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Vagrantfile') diff --git a/Vagrantfile b/Vagrantfile index 0ad753e..ddf0ece 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -8,9 +8,13 @@ sudo apt-get update sudo apt-get install -y python-pip python-virtualenv git ipython cd /vagrant virtualenv .venv -source .venv/bin/active +source .venv/bin/activate pip install -r requirements.txt pip install -r test-requirements.txt +grep 'cd /vagrant' /home/vagrant/.bashrc || + echo 'cd /vagrant' >> /home/vagrant/.bashrc +grep 'source .venv/bin/activate' /home/vagrant/.bashrc || + echo 'source .venv/bin/activate' >> /home/vagrant/.bashrc EOF Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| @@ -18,7 +22,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.box = "ubuntu/trusty64" config.vm.define "dev" do |dev| - dev.vm.provision "shell", inline: " echo 'cd /vagrant' >> /home/vagrant/.bashrc && #{INSTALL_DEPS}" + dev.vm.provision "shell", inline: "#{INSTALL_DEPS}" end end -- cgit v1.2.3