Marc Haber <[EMAIL PROTECTED]> writes:

> Stupid question: The commands you pipe into dpep end up being executed
> by the shell that is invoked by dpep in the editable source tree?

Yes.  The idea is to semi-automatically update our autofiles.dpatch.
Those commands run all the autofoo needed to bring the
dpatch-edit-patch temp tree up to date.  I presume as far as the shell
that dpatch-edit-patch launches is concerned, all those commands are
just coming in over stdin, as if they'd been typed.

>>   dpatch-edit-patch patch --command debian/update-autofiles autofiles
>
> Should the shell terminate after executing the script, immediately
> delivering a patch file, or do you want a shell nevertheless?

The --command would run instead of the shell.  I suppose if it turns
out to be useful, you could also support some other option that either
tells dpatch-edit-patch to launch a shell afterward, or allows you to
list things to do before the shell is run.

Actually, as a possibly more flexible alternative, dpatch-edit-patch
could just allow multiple --command arguments and execute them in
order.  If there were no --command arguments, the default would be
--command=/bin/sh, which would preserve the current behavior.

So people who want something non-interactive could say

  dpatch-edit-patch --command my-script

and people who want pre and/or post actions could say

  dpatch-edit-patch --command pre-script --command bash --command post-script

Of course with such an approach, it might be nicer if
dpatch-edit-patch treated any non-zero exit status as an abort, rather
than just exit 230, but I suppose you can always use shell traps to
work around that, at least if you're using scripts rather than
compiled executables for your --commands.

Also, I'm not stuck on --command, --cmd, -c, or whatever would be
fine.

-- 
Rob Browning
rlb @defaultvalue.org and @debian.org; previously @cs.utexas.edu
GPG starting 2002-11-03 = 14DD 432F AE39 534D B592  F9A0 25C8 D377 8C7E 73A4


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to