Skip to content

Commit

Permalink
fix vagrant provisioning to not reclone the project
Browse files Browse the repository at this point in the history
  • Loading branch information
andersoncardoso committed Apr 25, 2014
1 parent 42eee81 commit 9e92ae6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@

# uploads
/public/uploads

# vagrant
.vagrant
18 changes: 12 additions & 6 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,21 @@ then
sudo -u postgres createuser -r -s -d vagrant
sudo -u postgres createdb vagrant -O vagrant

# Clone the Meppit repo
# Configure Meppit
cd /home/vagrant/
sudo -u vagrant git clone https://github.com/it3s/meppit.git meppit
sudo -u vagrant ln -s /vagrant /home/vagrant/meppit

# Configure Meppit
cd meppit
sudo -u vagrant cp config/secrets.yml.sample config/secrets.yml
sudo -u vagrant cp config/database.yml.sample config/database.yml
sudo -u vagrant sed -i -e 's/username: postgres/username: vagrant/g' config/database.yml
if [ ! -f config/secrets.yml ]
then
sudo -u vagrant cp config/secrets.yml.sample config/secrets.yml
fi

if [ ! -f config/database.yml ]
then
sudo -u vagrant cp config/database.yml.sample config/database.yml
sudo -u vagrant sed -i -e 's/username: postgres/username: vagrant/g' config/database.yml
fi

# Setup
bundle
Expand Down

0 comments on commit 9e92ae6

Please sign in to comment.