Files
sterivein/reset_install.sh
gmorel 19ea6d25df WIP
Merge on master
2013-09-03 11:02:36 +02:00

35 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
# @author Guillaume MOREL
# v0.1
echo -e "\033[47m\033[1;31m\n[WARN] This script will reset this Thelia2 install\n\033[0m"
echo -e "\n\e[01;34m[INFO] Downloading vendors\e[00m\n"
composer install --prefer-dist
cd local/config/
echo -e "\n\e[01;34m[INFO] Building Models file\e[00m\n"
../../bin/propel build -v --output-dir=../../core/lib/
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"
cd ../..
php Thelia thelia:install --db_host localhost --db_username thelia2 --db_password thelia2 --db_name thelia2
echo -e "\n\e[01;34m[INFO] Installing fixtures\e[00m\n"
php install/faker.php
echo -e "\n\e[01;34m[INFO] Adding admin\e[00m\n"
php Thelia thelia:create-admin --login_name thelia2 --password thelia2 --last_name thelia2 --first_name thelia2
echo -e "\n\e[00;32m[SUCCESS] Reset done\e[00m\n"