aboutsummaryrefslogtreecommitdiffstats
path: root/script
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2018-04-01 09:51:51 +0200
committerHarald Eilertsen <haraldei@anduin.net>2018-04-01 09:51:51 +0200
commite4dec2bc26ef55c550c91c329f382bc6f087284b (patch)
tree64a40d40b528db7fba643000347713e6bf968aef /script
parentdbff5212481f4c113b68d584fac57b6feea4fbbd (diff)
downloadhmnoweb-e4dec2bc26ef55c550c91c329f382bc6f087284b.tar.gz
hmnoweb-e4dec2bc26ef55c550c91c329f382bc6f087284b.tar.bz2
hmnoweb-e4dec2bc26ef55c550c91c329f382bc6f087284b.zip
Fix bootstrapping vagrant environment.
- just start postgresql instead of restarting everything after install. - update setup script to install required ruby version and deps if not installed. - seed database when running the dev:setup rake task.
Diffstat (limited to 'script')
-rwxr-xr-xscript/setup11
1 files changed, 10 insertions, 1 deletions
diff --git a/script/setup b/script/setup
index 7823f40..9ddd50b 100755
--- a/script/setup
+++ b/script/setup
@@ -1,4 +1,13 @@
-#!/bin/bash
+#!/usr/bin/env bash
+ruby_status=$(rbenv version |& awk '{ printf $4 " " $5 " " $6 }'|sed -r 's/[ ]+$//')
+echo \"${ruby_status}\"
+if [[ "${ruby_status}" == "is not installed" ]]
+then
+ rbenv install $(cat .ruby-version)
+ gem install bundler
+ bundle config build.sqlite3 --with-sqlite3-dir=/usr/local
+fi
+
bundle install --without=production
if [ $? ]; then