Package: debianutils
Version: 4.2.1
Severity: wishlist

Managing hook scripts (e.g., githooks(5)) shares many of the problems of
managing startup scripts.  It is often useful for one hook script to
trigger multiple independent actions; for example, a Git post-receive
hook might want to send out email notifications, trigger an automated
build, etc.  It would be nice to organize these actions as separate
scripts in a subdirectory, like

    .git/
        hooks/
            post-receive
            post-receive.d/
                10-send-email-notification
                20-trigger-build
                ...

Just the thing for run-parts!

But hook scripts are often fed some data on their stdin.  For example,
the Git post-receive hook receives input that tells what references have
been changed, one line per reference.  These data would be needed by
*each* of the sub-hook scripts for them to run correctly.

Therefore, it would be useful if there were an option to make run-parts
multiplex its stdin to *each* of the programs that it runs:

    ========= post-receive =================
    #! /bin/sh

    run-parts --mux-stdin -- post-receive.d

In the general case this would require the stdin to be written to a
temporary file, though in most real-world cases it would probably be
fine to cache the input in RAM.

It is not hard to write a separate utility with this functionality, but
it seems to me that it is a feature that would fit in well with what
run-parts already does.


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to