#!/bin/bash set -e cd "$(dirname "$0")/.." if [ "$(uname -s)" = "Darwin" ]; then brew update >/dev/null brew bundle check &>/dev/null || brew bundle brew bootstrap-rbenv-ruby brew setup-nginx-conf onslaught . config/dev/nginx.conf.erb BUNDLE="brew bundle exec -- bundle" else BUNDLE="bundle" fi echo "==> Installing gem dependencies…" gems_path=vendor/gems bundle check --path ${gems_path} >/dev/null 2>&1 || { $BUNDLE install --path ${gems_path} } if [[ $* == *--tests* ]]; then echo "==> Bootstraping tests" script/bootstrap-tests else echo "==> Skipping test boostrapping, run script/bootstrap --tests to bootstrap tests" fi