mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2024-12-22 23:17:22 +02:00
prod/doc/figfilt: script to filter portions of a FIG file based on keys in comments
This file is part of the production documentation build process but was never committed.
This commit is contained in:
parent
63a6ad22bf
commit
5733b60721
18
prod/doc/figfilt
Executable file
18
prod/doc/figfilt
Executable file
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/perl
|
||||
$key = shift @ARGV;
|
||||
$skip = 0;
|
||||
$skipping = 0;
|
||||
while (<>) {
|
||||
if (/^#/ && $. != 1) {
|
||||
$skip = $_ !~ /$key/;
|
||||
print unless $skip;
|
||||
next;
|
||||
}
|
||||
if (/^\s/) {
|
||||
print unless $skipping;
|
||||
next;
|
||||
}
|
||||
print unless $skip;
|
||||
$skipping = $skip;
|
||||
$skip = 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user