Skip to content

Instantly share code, notes, and snippets.

@msadouni
Created September 23, 2009 09:50
Show Gist options
  • Save msadouni/191866 to your computer and use it in GitHub Desktop.
Save msadouni/191866 to your computer and use it in GitHub Desktop.
Initializes a git repository for a new CakePHP 1.2 application with the DebugKit plugin
#!/bin/bash
git init
echo "<?php" > config/config.php
find . -type d -empty | xargs -I % touch %/.gitignore
echo 'tmp/**/*' >> .gitignore
echo 'tmp/**/**/*' >> .gitignore
ignored_files=( .htaccess config/core.php config/config.php config/database.php webroot/.htaccess webroot/index.php webroot/test.php )
for ignored_file in ${ignored_files[@]}
do
cp $ignored_file $ignored_file.default
echo $ignored_file >> .gitignore
done
echo '!.gitignore' >> .gitignore
git add .
git commit -m "Initial import"
git clone http://github.com/cakephp/debug_kit.git plugins/debug_kit
cd plugins/debug_kit
git checkout 1.2
cd ../..
rm -rf plugins/debug_kit/.git
echo "<?php
class AppController extends Controller {
var \$components = array('DebugKit.Toolbar');
}
?>" > app_controller.php
git add .
git commit -m "DebugKit 1.2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment