summaryrefslogtreecommitdiffstats
path: root/bin/check-new-issues
diff options
context:
space:
mode:
authorStefan Fritsch <sf@debian.org>2009-01-03 12:05:35 +0000
committerStefan Fritsch <sf@debian.org>2009-01-03 12:05:35 +0000
commit5e32f4b87b433a5a856be486d2567ad2404bade5 (patch)
tree866cc14f4d88bb1d14a77d6a4c83cd5bf3f7d72b /bin/check-new-issues
parent54a45debc1350099c8129ec44e6ef9415fae5d26 (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-xbin/check-new-issues6
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>) {

© 2014-2024 Faster IT GmbH | imprint | privacy policy