#!/bin/bash

set -e
export CC=gcc

echo "==> Initing Git submodules"

git submodule update --init --recursive

echo "==> Installing gem dependencies…"

bundle install "$@"

echo "==> Installing required libraries…"

if [ "$(uname)" == "Darwin" ]; then
  ../script/install_homebrew_deps
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
  $(dirname $0)/install_linux_deps
fi
