Commit d6da642b authored by David Lawrence's avatar David Lawrence
Browse files

Use the copyrights file (or other list of files) as inputer rather than using

a find command to generate the files to update.  this skips doc/drafts,
doc/rfc, lib/dns/sec/dnssafe, lib/dns/sec/openssl and any other files
we do not make changes to.
parent 4e2f273e
......@@ -15,46 +15,34 @@
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
# $Id: spacewhack.pl,v 1.1 2000/08/01 00:51:14 tale Exp $
# $Id: spacewhack.pl,v 1.2 2000/08/01 15:25:07 tale Exp $
$0 =~ s%.*/%%;
$find = "find . -type f -print";
open(FILES, "$find | sort |")
or die "can't start \"$find\": $!";
if (@ARGV != 0) {
warn "Usage: $0 < list-of-files\n";
warn "The util/copyrights file is normally used for list-of-files.\n";
exit(1);
}
$total = 0;
printf "Lines Trimmed:\n";
while (defined($file = <FILES>)) {
chomp $file;
# Cheap test for files to ignore.
next if $file =~ m%/\.#%; # CVS conflict files.
next if $file =~ m%/CVS/%; # CVS metafiles.
next if $file =~ m%\.[oa]$%; # Object and library files.
next if $file =~ m%/#[^/]+#$%; # Emacs autosave.
next if $file =~ m%~([0-9]+~)?$%; # Emacs version control.
while (defined($line = <STDIN>)) {
($file) = split(/\s+/, $line, 2);
# Generated by configure.
next if -f "$file.in";
# These are binary and must be ignored.
next if $file =~ m%/random.data|\.gif$%;
next if -B $file;
# Known binaries.
next if $file =~ m%/(named|lwresd|rndc)$%;
next if $file =~ m%/(dig|host|nslookup|nsupdate)$%;
next if $file =~ m%/dnsssec-(sign(key|zone)|keygen|makekeyset)$%;
next if $file =~ m%/t_[^.]*$%;
# A little more expensive test for remaining files to ignore.
next if -B $file;
print "$file\n";
unless (open(FILEIN, "< $file")) {
warn "$0: open < $file: $!, skipping\n";
next;
}
undef $/; # Slurp whole file.
$_ = <FILEIN>;
$/ = "\n"; # Back to line-at-a-time for <FILES>.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment