mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 22:15:20 +00:00
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.
This commit is contained in:
@@ -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;
|
||||
while (defined($line = <STDIN>)) {
|
||||
($file) = split(/\s+/, $line, 2);
|
||||
|
||||
# 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.
|
||||
# These are binary and must be ignored.
|
||||
next if $file =~ m%/random.data|\.gif$%;
|
||||
next if -B $file;
|
||||
|
||||
# Generated by configure.
|
||||
next if -f "$file.in";
|
||||
|
||||
# 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>.
|
||||
|
Reference in New Issue
Block a user