refactor reset_install script

This commit is contained in:
Manuel Raynaud
2013-09-03 11:14:44 +02:00
parent 15a91a9fd9
commit 1496f51c0e
2 changed files with 5 additions and 8 deletions

View File

@@ -2,6 +2,7 @@
namespace Thelia\Model;
use Thelia\Core\Event\CategoryEvent;
use Thelia\Model\Base\Category as BaseCategory;
use Propel\Runtime\ActiveQuery\Criteria;
use Thelia\Tools\URL;

View File

@@ -5,7 +5,6 @@
echo -e "\033[47m\033[1;31m\n[WARN] This script will reset this Thelia2 install\n\033[0m"
if [ ! -f local/config/database.yml ]; then
cp local/config/database.yml.sample local/config/database.yml
echo "[FAILED] Please add your database informations in local/config/database.yml and start this script again."
else
echo -e "\n\e[01;34m[INFO] Downloading vendors\e[00m\n"
@@ -19,14 +18,11 @@ else
echo -e "\n\e[01;34m[INFO] Building SQL CREATE file\e[00m\n"
../../bin/propel sql:build -v --output-dir=../../install/
# Not working : insert manually
# echo -e "\n\e[01;34m[INFO] Inserting SQL\e[00m\n"
# ../../bin/propel insert-sql -v --output-dir=../../install/
# install/thelia.sql
# install/insert.sql
echo -e "\n\e[01;34m[INFO] Reinstalling Thelia2\e[00m\n"
echo -e "\n\e[01;34m[INFO] Reloaded Thelia2 database\e[00m\n"
cd ../..
php Thelia thelia:install
rm install/sqldb.map
php Thelia thelia:dev:reloadDB
echo -e "\n\e[01;34m[INFO] Installing fixtures\e[00m\n"
php install/faker.php