Created
April 11, 2009 19:56
-
-
Save johnreilly/93703 to your computer and use it in GitHub Desktop.
This file contains 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
### Get rid of unneeded files | |
["./tmp/pids", "./tmp/sessions", "./tmp/sockets", "./tmp/cache"].each do |f| | |
run("rmdir #{f}") | |
end | |
["./README", "./doc/README_FOR_APP", "./public/index.html", "./public/favicon.ico", "./public/images/rails.png", "./public/robots.txt"].each do |f| | |
run("rm #{f}") | |
end | |
### Don't ignore empty directories | |
run("find . \\( -type d -empty \\) -and \\( -not -regex ./\\.git.* \\) -exec touch {}/.gitignore \\;") | |
### Create sample db config | |
run "cp config/database.yml config/database.yml.sample" | |
### Set up .gitignore file | |
run "echo \"log/*.log | |
log/*.pid | |
db/*.db | |
db/*.sqlite3 | |
tmp/**/* | |
.DS_Store | |
doc/api | |
doc/app | |
config/database.yml\" > .gitignore" | |
### Git 'er up. | |
git :init | |
git :add => "." | |
git :commit => "-a -m 'Initial commit.'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment