main
1#!/usr/bin/env sh
2
3# Set up Rails app. Run this script immediately after cloning the codebase.
4# https://github.com/thoughtbot/guides/tree/master/protocol
5
6# Exit if any subcommand fails
7set -e
8
9# Set up Ruby dependencies via Bundler
10bundle install --path vendor/bundle -j 4
11
12# Set up configurable environment variables
13if [ ! -f .env ]; then
14 cp .env.example .env
15fi
16
17if [ ! -f config/database.yml ]; then
18 cp config/database.yml.example config/database.yml
19fi
20
21# Print warning if Foreman is not installed
22if ! command -v foreman &>/dev/null; then
23 echo "foreman is not installed."
24 echo "See https://github.com/ddollar/foreman for install instructions."
25fi