Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 40648 Details for
Bug 65086
cvs commit does not mail gentoo-doc-cvs anymore
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
mpipe.rb
mpipe.rb (text/plain), 1.34 KB, created by
Xavier Neys (RETIRED)
on 2004-09-28 11:59:13 UTC
(
hide
)
Description:
mpipe.rb
Filename:
MIME Type:
Creator:
Xavier Neys (RETIRED)
Created:
2004-09-28 11:59:13 UTC
Size:
1.34 KB
patch
obsolete
>#!/usr/bin/ruby > ># mpipe reads STDIN and pipes it to multiple processes ># ># Usage: whatever | mpipe.rb common_args -pipe pgm1 -pipe pgm2 pgm2_args ># ># pgm1 and pgm2 will all receive whatever's STDOUT on their STDIN ># All arguments appearing before the first -pipe switch will be passed to ># all called programs before their own arguments ># ># Example of a CVS loginfo entry: ># ># \/doc\/en ( $CVSROOT/CVSROOT/mpipe.rb %{s} -pipe $CVSROOT/CVSROOT/commitlog-doc.pl -pipe $CVSROOT/CVSROOT/ciabot.pl $USER gentoo cvs-commits@gentoo.org cia@navi.cx ) ># ># Current limitation: programs that expect a -pipe argument themselves cannot be called ># ># Target usage: send CVS loginfo to multiple processes > > ># Parse cmd line >aPipes=[] >curr="" >common=""; gotOne=false >ARGV.each {|p| > if p == '-pipe' > gotOne = true > # Open current pipe cmd before starting a new one > aPipes << IO.popen(curr, "w") if curr.length > 0 > # Init next pipe cmd > curr = "" > else > # Add argument to current pipe cmd or to the common args > if gotOne then > curr << "#{p} #{common if curr.length == 0} " > else > common << "#{p} " > end > end >} ># Last cmd >aPipes << IO.popen(curr, "w") if curr.length > 0 > ># Read STDIN and send it to all opened pipes >STDIN.each { |line| > aPipes.each { |p| > p.puts(line) > } >} > ># Close all pipes and exit >aPipes.each {|p| p.close_write} >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 65086
:
40298
| 40648 |
40649