vidpush/bin/setup
2014-04-07 14:41:34 -04:00

33 lines
757 B
Bash
Executable File

#!/usr/bin/env sh
# Set up Rails app. Run this script immediately after cloning the codebase.
# https://github.com/thoughtbot/guides/tree/master/protocol
# Exit if any subcommand fails
set -e
# Set up Ruby dependencies via Bundler
bundle install
# Set up database and add any development seed data
bundle exec rake dev:prime
# Add binstubs to PATH via export PATH=".git/safe/../../bin:$PATH" in ~/.zshenv
mkdir -p .git/safe
# Set up configurable environment variables
if [ ! -f .env ]; then
cp .sample.env .env
fi
# Pick a port for Foreman
echo "port: 7000" > .foreman
# Set up DNS via Pow
if [ -d ~/.pow ]
then
echo 7000 > ~/.pow/`basename $PWD`
else
echo "Pow not set up but the team uses it for this project. Setup: http://goo.gl/RaDPO"
fi