Aap - Reading recipes from stdin

François Pinard <[email protected]> Sat, 24 Sep 2005 09:56:37 -0400
Newsgroups gmane.comp.tools.aap.user
Message-ID <[email protected]>
Hi, Bram and people.

In some shell scripts, I would like being able to call ``aap`` while
giving it the recipe file as a kind of constant, instead of creating
a temporary file to hold it, and making sure that temporary file is
removed afterwards.  Something like::

    echo '
    Contents
    of
    recipe
    file
    ' | aap -f -

if only ``-`` was meaning standard input, say, when given to ``-f``.
I would like to merely hide ``aap`` calls in scripts, for a directory
already full of scripts which users already call as scripts.

Another avenue, which would be much nicer if doable, would be to
she-bang an Aap recipe (that is, adding a ``#!/usr/bin/env aap -f -``
line or such at the beginning) and then, adding executable bits on the
recipe file.  A problem might exist with parameter passing, maybe not.

So, I wonder.  Is there a way already?  Or even a better or nicer way?
Am I insane with the idea of using standard input for such a goal? :-)

-- 
François Pinard   http://pinard.progiciels-bpi.ca


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. 
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php