diff options
author | Thomas Roessler <roessler@does-not-exist.org> | 1998-06-08 09:16:03 +0000 |
---|---|---|
committer | Thomas Roessler <roessler@does-not-exist.org> | 1998-06-08 09:16:03 +0000 |
commit | 1a5381e07e97fe482c2b3a7c75f99938f0b105d4 (patch) | |
tree | b4fa4088bbbf5fc9217ee6f87ab60034175e6899 /reap.pl |
Initial revision
Diffstat (limited to 'reap.pl')
-rwxr-xr-x | reap.pl | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/reap.pl b/reap.pl new file mode 100755 index 00000000..90e532bd --- /dev/null +++ b/reap.pl @@ -0,0 +1,26 @@ +#!/usr/local/bin/perl +# +# A small script to strip out any "illegal" PGP code to make sure it is +# safe for International export. +# +$word = shift; +$illegal = 0; +$count = 0; +while (<>) +{ + if (/^#if/) + { + if (/${word}/) { $illegal = 1; } + if ($illegal) { $count++; } + } + elsif ($illegal && /^#endif/) + { + $count--; + if ($count == 0) + { + $illegal = 0; + next; + } + } + print if (! $illegal); +} |