diff options
author | Stefan Fritsch <sf@debian.org> | 2009-01-03 12:05:35 +0000 |
---|---|---|
committer | Stefan Fritsch <sf@debian.org> | 2009-01-03 12:05:35 +0000 |
commit | 249ee51ee8cf4bbef066b6641dad2516ed073a14 (patch) | |
tree | 9d394e1a1b46ccfcbd7027352169fc23827bc0a1 /bin/check-new-issues | |
parent | 1a2532eabfe3efe75e5af97a0573022713b90687 (diff) |
allow to read embedded-code-copies from stdin, for use in svn hook
git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@10840 e39458fd-73e7-0310-bf30-c45bca0a0e42
Diffstat (limited to 'bin/check-new-issues')
-rwxr-xr-x | bin/check-new-issues | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/check-new-issues b/bin/check-new-issues index 3f77e8bc79..0781bc3d95 100755 --- a/bin/check-new-issues +++ b/bin/check-new-issues @@ -7,7 +7,7 @@ use Getopt::Std; 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 @@ OPTIONS: [ -l [-n <n>] [-f] ] -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 auto_search { } 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>) { |