Skip to content

Instantly share code, notes, and snippets.

@stealthinu
Last active December 17, 2015 12:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save stealthinu/5610193 to your computer and use it in GitHub Desktop.
Save stealthinu/5610193 to your computer and use it in GitHub Desktop.
make my CakePHP with no using Inflector submoduled CakePHP (easy to update) plugins: DebugKit/TwigView/TwitterBootstrap/Search
#!/bin/bash
if [ $# -ne 0 ]; then
project_name=${1}
else
echo "usage: makecake.sh [project_name]"
exit
fi
if [ -e ${project_name} ]; then
echo ${project_name} "exists."
exit
fi
# CakePHP files
git clone --depth 1 git://github.com/cakephp/cakephp.git ${project_name}
cd ${project_name}
chmod +x app/Console/cake.bat
chmod -R 777 app/tmp
cp app/Config/database.php.default app/Config/database.php
# submodule CakePHP
rm -rf .git lib README.md
git init
git submodule add git://github.com/cakephp/cakephp.git
git submodule update --init
# git
git config core.filemode false
git add .
git add -f app/Config app/tmp lib/Cake/Console/Templates/skel/tmp
git commit -m 'first commit'
# Plugins (DebugKit/TwigView/TwitterBootstrap)
git submodule add git://github.com/cakephp/debug_kit.git app/Plugin/DebugKit
git submodule add git://github.com/predominant/TwigView.git app/Plugin/TwigView
git submodule add git://github.com/slywalker/TwitterBootstrap.git app/Plugin/TwitterBootstrap
git submodule add git://github.com/CakeDC/search.git app/Plugin/Search
git submodule update --init --recursive
# bootstrap files
wget http://twitter.github.io/bootstrap/assets/bootstrap.zip
unzip bootstrap.zip
(cd bootstrap; cp -R * ../app/webroot/)
rm -rf bootstrap bootstrap.zip
git commit -a -m 'plugins'
# CakePHP setting files
wget --no-check-certificate https://raw.github.com/gist/22189b4968c74b5c3531 -O mycakephp.patch
patch -p1 < mycakephp.patch
rm mycakephp.patch
git commit -a -m 'settings'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment