grep those gits aka drupal contribs

http://images.icanhascheezburger.com/completestore/2009/1/21/128770736688691365.

Following along the git migration and project cannot be grepped anymore I brewed the following code.

It assumes the gits are already cloned and placed is one common directory.

After running the script all repositories with a $major == 7 branch are set into the highest version.

I'm puzzling how to 'empty' the non $major compatible repos.

The fun part is now doing analysis on the tree

Searching an issue on drupal.org with jQuery.grep

On http://drupal.org/node/686938 people are reporting a lot sloppy reports of error lines. The issue is about
Undefined index: [xyz] in line ...

But what are the names of the failing indexes?

jQuery has a nice grep so lets use it.

Dumping all tables with drush

I want a clean database without clicking.

echo "\
SELECT concat('drop table ', table_name, ';') \
  FROM information_schema.tables \
  WHERE table_schema=schema()" \
| `drush sql-connect` \
| grep "^drop table " \
| `drush sql-connect`

This work only for single drupal / single schema installs.