8

I have a dev site with many modules. I have another dev site on a different server that I'd like to populate with the same modules. I can zip 'em up and move the file, or use rsync, but I wanted to see if drush-make would do it faster.

I can create only modules without core using: "drush make --no-core makefile.make" within the module directory but this creates the sites/all/modules directory hierarchy.

How can you use drush make to just build the modules in the modules directory without that structure?

8

If you run drush make --contrib-destination=sites/mysite, then modules will be placed in sites/mysite/modules. rsync is going to be faster than Drush make. (Edit: This speed comparison presumes roughly equal transfer speeds between the endpoints. I can see how make might be faster if you have a fast connection from the target to d.o, but a slow connection between the source and the target.)

If you want to create a makefile for an existing site, you may use drush generate-makefile, or build a whole installation profile with drush generate-profile.

  • That didn't work. As a test I made a directory, test_drush, in the site root and put the makefile in it. The command: 'drush make --no-core --contrib-destination=all/modules makefile.make' still creates that hierarchy in that directory. If the hierarchy test_drush/all/modules already exists, it ends up like this, no matter how I try it: test_drush/all/modules/modules/module_xyz, even if I have this to start: test_drush/all, and no modules sub-directory. I think rsync would be really slow from my pc as my upload speed is poor. Rsync is fast as a file sync if the files already exist. – Jeff Oct 14 '12 at 3:51
  • 1
    I am unclear as to why you are trying to put your modules at test_drush/all/modules. If you specify sites/mysite, then the target will be sites/all/modules, so it is expected that --contrib-destination=all/modules would give you all/modules/modules. Did you try --contrib-destination=all? – greg_1_anderson Oct 14 '12 at 4:46
  • I was just testing the results of drush make because I didn't want to screw up the file structure if it failed. I punted and used rsync. Maybe what you suggested would work - I'll try it again later. Thanks! – Jeff Oct 15 '12 at 3:56
  • It's a good idea to run drush make on an empty site, especially when testing; then you can just blow away the whole thing after the test. It would also make a better test if you make the modules install at their final intended destination (e.g. sites/all/modules). – greg_1_anderson Oct 15 '12 at 4:18

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.