Skip to content

Instantly share code, notes, and snippets.

@Dmi3yy
Last active July 24, 2023 18:42
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
  • Save Dmi3yy/17f99e3f1991c9657ee25c419d6e7e8f to your computer and use it in GitHub Desktop.
Save Dmi3yy/17f99e3f1991c9657ee25c419d6e7e8f to your computer and use it in GitHub Desktop.
evo.sh
#!/bin/bash
# basic script, before use need change logins,passwords in this script
# put this script in project folder and run: sh evo.sh
#variables
EVO_VERSION="3.x-dev"
INSTALL_TYPE=1
DATABASE_TYPE="mysql"
DATABASE_SERVER="localhost"
DATABASE_NAME="DB"
DATABASE_USER="USER"
DATABASE_PASS="PASS"
DATABASE_PREFIX="evo_"
ADMIN_LOGIN="admin"
ADMIN_EMAIL="emaill@gmail.com"
ADMIN_PASS="pass"
LANGUAGE="ru"
REMOVE_INSTALL="y"
MAIN_PACKAGE_NAME="main"
#remove all files in root folder
rm -rf {,.[!.],..?}*
#download Evolution CMS files from GitHub
composer create-project evolutioncms/evolution:$EVO_VERSION . --remove-vcs
#go to install folder and run cli-install
cd install/
php cli-install.php --typeInstall=$INSTALL_TYPE --databaseType=$DATABASE_TYPE --databaseServer=$DATABASE_SERVER --database=$DATABASE_NAME --databaseUser=$DATABASE_USER --databasePassword=$DATABASE_PASS --tablePrefix=$DATABASE_PREFIX --cmsAdmin=$ADMIN_LOGIN --cmsAdminEmail=$ADMIN_EMAIL --cmsPassword=$ADMIN_PASS --language=$LANGUAGE --removeInstall=$REMOVE_INSTALL
#go to folder core
cd ../core/
#create main package and configure NameSpaces for controllers
php artisan package:create $MAIN_PACKAGE_NAME
echo '<?php return "EvolutionCMS\\$MAIN_PACKAGE_NAME\\Controllers\\";' > custom/config/cms/settings/ControllerNamespace.php
#install TinyMCE5 plugin and turn on by Default
php artisan extras extras TinyMCE5 master
echo '<?php return "TinyMCE5";' > custom/config/cms/settings/which_editor.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment