Author: sf Date: 2009-01-03 12:05:35 +0000 (Sat, 03 Jan 2009) New Revision: 10840 Modified: bin/check-new-issues Log: allow to read embedded-code-copies from stdin, for use in svn hook Modified: bin/check-new-issues ==================================================================--- bin/check-new-issues 2009-01-03 11:55:19 UTC (rev 10839) +++ bin/check-new-issues 2009-01-03 12:05:35 UTC (rev 10840) @@ -7,7 +7,7 @@ use Term::ReadLine; my %opts; -getopts(''ln:fhi:t:Tca:'', \%opts); +getopts(''ln:fhi:t:Tca:e:'', \%opts); if ($opts{h}) { print <<''EOF''; @@ -36,6 +36,7 @@ -t regexp : use regexp to select todos (default: ''^\s+TODO: check$'' ) -T : same as -t ''^\s+TODO: check'' (note the missing $) -c : only do syntax check of embedded-code-copies +-e <file> : use <file> for embedded-code-copies, "-" for STDIN -a <n> : If automatic apt-cache/apt-file search gives more than n results, display only the count (default 10) @@ -329,7 +330,8 @@ } sub read_embedded_copies { - open(my $fh, "$basedir/data/embedded-code-copies"); + my $emb_file = $opts{e} || "$basedir/data/embedded-code-copies"; + open(my $fh, $emb_file); # skip comments while (<$fh>) {