yaroslavbr
10/20/2016 - 6:42 PM

Modified oro setup script

Modified oro setup script

#!/bin/bash
# Commerce community

sudo rm /etc/php/7.0/cli/conf.d/20-xdebug.ini

if [ "$1" == 'test' ]
    then
        rm -rf app/cache/test/
        mysql -uroot -p123456 -e "DROP DATABASE IF EXISTS b2b_dev_test; CREATE DATABASE b2b_dev_test;"
        php app/console oro:install --env=test --user-name=admin --user-email=admin@example.com --user-firstname=test --user-lastname=testovich --user-password=1111 --sample-data=n --organization-name=OroTest --no-interaction --force --drop-database --skip-assets
        php app/console cache:warmup --env=test
    else
        rm -rf app/cache/dev/ app/cache/prod/
        sed -i "s/installed"\:".*/installed"\:" false/g" app/config/parameters.yml;
        mysql -uroot -p123456 -e "DROP DATABASE IF EXISTS b2b_dev; CREATE DATABASE b2b_dev;"
        php app/console oro:install --env=prod --user-name=admin --user-email=admin@example.com --user-firstname=test --user-lastname=testovich --user-password=1111 --sample-data=y --organization-name=OroTest --no-interaction --force --drop-database --symlink
        php app/console cache:warmup
fi
#sudo chmod -R a+w app/cache
sudo ln -s /etc/php/7.0/mods-available/xdebug.ini /etc/php/7.0/cli/conf.d/20-xdebug.ini