Sha256: d3c507205b18a0720ad148a62cfc7592208f102f55ff6cf1094ae588099f46b1

Contents?: true

Size: 497 Bytes

Versions: 6

Compression:

Stored size: 497 Bytes

Contents

#!/usr/bin/env bash

function main {
  set -e

  add_new_env_vars
  bundle install
  bundle exec rake db:setup db:schema:load db:migrate
}

function add_new_env_vars {
  touch .env
  export IFS=$'\n'
  for var in `cat .env.sample`; do
    key="${var%%=*}"     # get var key
    var=`eval echo $var` # generate dynamic values

    # If .env doesn't contain this env key, add it
    if ! `grep -qLE "^$key=" .env`; then
      echo "Adding $key to .env"
      echo $var >> .env
    fi
  done
}

main

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
pliny-0.3.0 template/bin/setup
pliny-0.2.1 template/bin/setup
pliny-0.2.0 template/bin/setup
pliny-0.1.0 template/bin/setup
pliny-0.0.4 template/bin/setup
pliny-0.0.3 template/bin/setup