There are a few cases where I would like to be able to execute shell commands during the processing of a drush make file. Just for example, changing permissions on certain dirs, or creating the files dir, etc. Just something simple like

exec[sites_perms] = "chmod 755 sites/default"

that can call drush_shell_exec. Would you be interested in functionality like that?

Comments

dmitrig01’s picture

I would but you'd have to manually turn them on, i.e. --execute-shell-scripts. Also, no need to actually name it. BTW, that statement fits more into #633140: --prepare-install should copy settings file, which is completely broken

dmitrig01’s picture

Status: Active » Closed (works as designed)

On further thought, you're running drush_make from the shell anyway, so why don't you just run the command there as well?

jefkin’s picture

On further thought, you're running drush_make from the shell anyway, so why don't you just run the command there as well?

The main point of the make file is to avoid tedious repetitive tasks that in other environments would be in a shell script or makefile. This maybe closed for good, but if not I'd vote for inclusion of this functionality.

Because there was no option to exec from make, -- due to the fact that you could *do* these things on a command line, we wrote a gigantic google doc for our company use internally listing the 100's (i kid you not) of shell tasks that had to be performed in specific orders before or after drush make. Our most complicated system required 4 different makefiles because some of the modules or themes depended on things being setup first.

We *have* improved over this and currently we use a special profile we wrote up. So, it gets everything done, doing all this work in php that's easier to do from shell. Make a link, change permissions, move files, etc. When in terms of maintenance and utility, this would be a whole heck of a lot better and simpler.

That's my opinion, and experience as a drupal developer. If this doesn't make the cut, so be it, but I'd urge you to think a bit more on this option if you could.

Also, in my opinion, if this does make the cut, because your in a shell anyway, you *shouldn't* have to set an option about exec-shell-scripts. If we need that then we couldn't use makefiles in our builds anyway, as the default profile make *wouldn't* include and exec-shell-scripts tag *sigh*. But that's another kettle of fish.