Last active
August 29, 2015 14:05
-
-
Save julienbourdeau/205df55bcf8aa290bd9e to your computer and use it in GitHub Desktop.
PrestaShop - Automatically setup dev environment (clone and install)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| red='\e[0;31m' | |
| green='\e[0;32m' | |
| orange='\e[0;33m' | |
| NC='\e[0m' # No Color | |
| remoteGitRepo="git@github.com:PrestaShop/PrestaShop.git" | |
| defaultRootDir="/var/www/" | |
| defaultDir="PrestaShop" | |
| cd defaultRootDir | |
| if [ -d $defaultRootDir$defaultDir ]; then | |
| echo -e "${orange}Deleting existing $defaultRootDir$defaultDir ${NC}" | |
| sudo rm -rf $defaultRootDir$defaultDir | |
| fi | |
| echo -e "${green}Cloning remote git repository ${NC}" | |
| git clone --recursive $remoteGitRepo | |
| cd $defaultDir | |
| echo -e "${green}Installing PrestaShop ${NC}" | |
| php ./install-dev/index_cli.php --domain=prestashop.ps --db_server=localhost --db_name=XXXXXXXXXX --db_user=XXXXXXXXXX --db_password="XXXXXXXXXX" | |
| echo -e "${green}Moving each module to 'dev' branch ${NC}" | |
| git submodule foreach git checkout dev | |
| git submodule foreach git pull --no-rebase | |
| echo -e "${green}Tweaking git repository ${NC}" | |
| git config core.fileMode false | |
| git foreach git config core.fileMode false | |
| echo -e "${green}Installing git hooks ${NC}" | |
| cd .git/hooks | |
| wget https://raw.githubusercontent.com/PrestaShop/standard_coding_hook/master/commit-msg | |
| wget https://raw.githubusercontent.com/PrestaShop/standard_coding_hook/master/pre-commit |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to use
bash mkps.sh