Skip to content

Instantly share code, notes, and snippets.

@jtrim
Created September 19, 2010 02:19
Show Gist options
  • Save jtrim/586292 to your computer and use it in GitHub Desktop.
Save jtrim/586292 to your computer and use it in GitHub Desktop.
root_dir = "/path/to/rails/app"
dirs = ["app/mailers", "app/models", "lib/tasks", "public/stylesheets", "test/fixtures", "test/functional", "test/integration", "test/unit", "vendor/plugins"]
dirs.each do |dir|
begin
File.open File.join(root_dir, dir, ".gitkeep"), "w" do |file|
file.puts ""
end
rescue
puts "nogo: #{dir}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment