Quick notes about Drush Make

I started to work with Drush make files quite recently and it's a shame for my that I didn't had the chance to work with it before. Make is a really powerfull tool that allows quick deployment of full drupal sites highly customized. This post isn't about how to use drush make, is just a set of quick notes of things I found while using it.

Downloading a library into any place

There are some modules that don't use an "standard" place for their libraries. Instead of using sites/*/libraries require that the library is downloaded into the module folder. That's easy to achieve, if you specify the library destination:

libraries[JsonPath][destination] = "modules/contrib/feeds_jsonpath_parser"

Non MD5 checksum validation

Drush make validates that the file has been downloaded correctly using the checksum, normally using MD5, but you can use other kind of hashes:

libraries[JsonPath][download][sha1] = "9d3bd4dc2c43aee928fe3afa6ab52670a1e38125"

Downloading library without container folder

When drush make downloads a library, the parameter [directory_name] is mandatory an deven if you don't use it, it will use the library name as directory. But what happens when a module requires the file to be directly into the module folder or on the libraries folder without any other folder containing it?

You can achieve it with this:

libraries[JsonPath][directory_name] = "feeds_jsonpath_parser"

libraries[JsonPath][destination] = "modules/contrib"

This solution doesn't work with Drush 4.

And that's it for now. But probably this post will grow when I find more tricky parts of Drush make.