Re: mmc patch
Cory Wright <cwright-dated-1044239083.197c9e-fBYJ9vZApKkqcZcGjlUOXw@public.gmane.org> Tue, 28 Jan 2003 21:24:43 -0500
| Newsgroups | gmane.comp.lang.moto.devel |
|---|---|
| Organization | Stand Blue Technology |
| Message-ID | <[email protected]> |
On Tue, Jan 28, 2003 at 01:47:55PM -0500, David Hakim wrote: > On Tuesday, January 28, 2003, at 01:21 PM, Cyb.org wrote: > >1. mmc -n borg -i file.moto > >compile module borg and install into libexec dir and asks if existing > >module should be replaced > > Ok ... although I don't know about the whole interactive mode thing ... > it makes mmc tougher to use in other scripts. I think unless -f is > present we shouldn't ask the user anything ... just tell him he should > try again with -f. I think it would be a good idea to try to avoid introducing anything into mmc that prompts a user for input. First, it introduces more code, which introduces more areas for possible bugs (especially when prompting a user for input that needs to be sanity checked). Second, like Dave said, it makes it more tricky to use mmc from inside other scripts. It is probably a good idea to begin considering rewriting mmc in something that will work on other platforms (maybe oneday a win32 port?) because /bin/sh might not always be available, but I think Cyb.org already mentioned this. > >2. mmc -n borg -I /home/borg/modules/ file.moto > >compile module borg and install into /home/borg/modules/ and asks if > >existing module should be replaced > > This sounds good ... same point about interactive mode though. Same here, I like this one. > >3. mmc -n borg -i -I /home/borg/modules/ file.moto > >compile module borg and install into libexec dir AND > >/home/borg/modules/ and asks if existing module should be replaced > > I'm still not sure about this ... should multiple -I options be allowed > as well ? I don't think this is an approach we should take. Basically what this is meant to accomplish is to put two copies of the same file in multiple places. Why build all that code into mmc when we have the cp/copy commands already available? There really is no difference in the following two sets of commands: # mmc -n borg -i -I /home/borg/modules/ file.moto # mmc -n borg -i file.moto # cp /usr/local/apache/libexec/mod_borg.so /home/borg/modules/ In fact, with the second approach we can forget about having to code for permissions/existing files/etc: the cp/copy commands will check that for us. > >6. mmc -n borg -f -i -I /home/borg/modules/ file.moto > >compile module borg and install into libexec dir AND > >/home/borg/modules/ AND overwrites modules with the same name in both > >directories > > > Still not sure about the multiple install locations / flags ... I think > I defer to Cory here # mmc -n borg -f -i -I /home/borg/modules/ file.moto or # mmc -n borg -i file.moto # cp -f /usr/local/apache/libexec/mod_borg.so /home/borg/modules/ Thoughts? Cory -- Cory Wright Stand Blue Technology http://www.standblue.net/