colinmollenhour / modman

Modularize extensions using symlinks. Voted #1 Magento tool by @WebShopApps!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

modman undeploy-all and remove-all

jhoelzl opened this issue · comments

Is it possible to provide a functionality like "undeploy-all" and "remove-all" in regards to the existing function deploy-all?

Thanks!

I'd be willing to take a crack at implementing this if Colin is open to the suggestion?

Go for it.

Hi @pocallaghan, do you have time to provide a basic impementation of these commands? Would be very nice.. Thanks!

Hi @jhoelzl,

Unfortunately I'm totally snowed under with work ATM.

OK, i have made a small shell script for my purpose that loops through the modman folders end performs the command modman undeploy. This works for me.

Currently I use a 'one liner' to handle undeploying all modules. When in the .modman directory run:

modman list | while read ext; do (modman undeploy $ext); done

That's the kind of thing modman list was added for. Does that method allow stdin from the user? I think it wouldn't, but maybe that is why you use the subshell? I've always preferred:

for ext in $(modman list); do modman undeploy $ext; done

Which does not use pipes so does not interfere with stdin. It is rare to need stdin, such as when you have a @shell script that needs a password or similiar.

I'm not so sure sorry, my knowledge of bash scripting is a little limited and I was looking for a solution to quickly undeploy all modules and that's what I came up with...

This is the first result in Google when searching for the functionality. modman undeploy works, the issue can be closed and the feature can be added to the documentation.