procmail
[Top] [All Lists]

Exit an included rc file?

1997-04-13 21:18:00
Here's a question...

Is there an easy way to exit from an rc file included via the INCLUDERC
variable?  I was hoping that setting the HOST variable would work, but
that exits from *everything*.

What I want is to immediately exit at the top of an rc file if a given
header exists.  Something like:

:0
* $ ^$THE_HEADER_I_WANT
{ HOST=_exit_from_rc_file_ }

I suppose one alternative is to wrap the entire rc file inside the
nesting block; that is:

:0
* $ ! ^$THE_HEADER_I_WANT
{
     ...the other recipes...
}

The difficulty here is that these recipes are being auto-generated from
*other* rc scripts, and trying to wrap them inside something like this
adds an additional level of complexity (and the resulting file offends
my aesthetics :-).

Any thoughts?

-- Lars

---
Lars Kellogg-Stedman * lars(_at_)bu(_dot_)edu * (617)353-8277
Boston University Office of Information Technology

<Prev in Thread] Current Thread [Next in Thread>