-
-
Save raulmangolin/5768391 to your computer and use it in GitHub Desktop.
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 | |
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