#!/usr/bin/env bash
set -e
. /opt/elasticbeanstalk/support/envvars

cd $(cd $(dirname $0); echo $PWD)
test -x envvars.sh && . envvars.sh
test -x envvars_dev.sh && . envvars_dev.sh
cd ..
set -xe

echo 'Running composer post command scripts ...'
if [ "${SYMFONY_DEBUG}" != "1" ]; then
    composer.phar run-script post-install-cmd --no-ansi --no-interaction --no-dev
else
    composer.phar run-script post-install-cmd --no-ansi --no-interaction
fi
