fix: populate ldns submodule and add autotools to LDNS build stage
- Re-cloned zonemaster-ldns with --recurse-submodules so the bundled ldns C library source (including Changelog and configure.ac) is present - Added autoconf, automake, libtool to Dockerfile.backend ldns-build stage so libtoolize + autoreconf can generate ldns/configure during make Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
75
zonemaster-ldns/ldns/pcat/pcat-grep.pl
Executable file
75
zonemaster-ldns/ldns/pcat/pcat-grep.pl
Executable file
@@ -0,0 +1,75 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
# take a numerical range and ranges and
|
||||
# only show those ranges or not (-v)
|
||||
# single numbers: 4
|
||||
# ranges: 5-10 (inclusive)
|
||||
# separated by comma's
|
||||
# -v reverse
|
||||
|
||||
use strict;
|
||||
|
||||
my %numbers = ();
|
||||
my $reverse = 0;
|
||||
my $i;
|
||||
my $k;
|
||||
|
||||
foreach my $r (@ARGV) {
|
||||
|
||||
if ($r eq "-v") {
|
||||
$reverse = 1;
|
||||
next;
|
||||
}
|
||||
|
||||
if ($r =~ /-/) {
|
||||
my ($s, $e) = split /-/, $r;
|
||||
|
||||
if ($s > $e) {
|
||||
next;
|
||||
}
|
||||
|
||||
for ($i = $s; $i <= $e; $i++) {
|
||||
$numbers{$i} = 1;
|
||||
}
|
||||
next;
|
||||
}
|
||||
$numbers{$r} = 1;
|
||||
}
|
||||
|
||||
# read in the input, pcat style
|
||||
my $line; my $left; my $right;
|
||||
$i = 1;
|
||||
my $print = 0;
|
||||
while(<STDIN>) {
|
||||
if ($i % 4 == 1) {
|
||||
s/^q: //; # kill it, if we do query diff
|
||||
|
||||
($left, $right) = split /:/, $_;
|
||||
foreach $k (keys %numbers) {
|
||||
if ($k == $left) {
|
||||
if ($reverse == 1) {
|
||||
$print = 0;
|
||||
} else {
|
||||
$print = 1;
|
||||
}
|
||||
last;
|
||||
}
|
||||
if ($reverse == 1) {
|
||||
$print = 1;
|
||||
} else {
|
||||
$print = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($print == 1) {
|
||||
print $_;
|
||||
}
|
||||
if ($i % 4 == 0) {
|
||||
if ($reverse == 1) {
|
||||
$print = 1;
|
||||
} else {
|
||||
$print = 0;
|
||||
}
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
Reference in New Issue
Block a user