0

My module depends on a PHP library (sites/all/libraries/xyz/xyz-library.php). It doesn't install unless the external library libraries/xyz/xyz-library.php is in place. Is there a way to install the library using Drush first and then install the module?

  • 1
    I am not sure if you need to install library module, but your best bet could be to go to the folder and curl or wget the library (in case if you have the link) – user12947 Mar 5 '14 at 0:24
1

You can actually use drush make for this purpose. Drush make files can add in third-party dependencies which can be useful for just this kind of thing. Unless you intend to share this module with the community, in which case, you can issue a wget from the module itself similar to how other contrib modules do it. (See JW Player for an older example of that)

This is a good post on the topic by basically a Drupal genius. (Not me, I swear)

http://davehall.com.au/blog/dave/2011/05/17/drush-make-and-module-dependencies

| improve this answer | |
  • 1
    This isn't always advisable, especially for Drupal Install Profiles. See this comment on your linked article davehall.com.au/blog/dave/2011/05/17/… – tenken Mar 5 '14 at 2:07
  • Ah I wasn't initially clear on him doing this from an install profile! Good point. Thanks for clarifying. – webkenny Mar 6 '14 at 13:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.