mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-01 15:05:23 +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
|
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
|
||||||
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
# 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%.*/%%;
|
$0 =~ s%.*/%%;
|
||||||
|
|
||||||
$find = "find . -type f -print";
|
if (@ARGV != 0) {
|
||||||
|
warn "Usage: $0 < list-of-files\n";
|
||||||
open(FILES, "$find | sort |")
|
warn "The util/copyrights file is normally used for list-of-files.\n";
|
||||||
or die "can't start \"$find\": $!";
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
$total = 0;
|
$total = 0;
|
||||||
|
|
||||||
printf "Lines Trimmed:\n";
|
printf "Lines Trimmed:\n";
|
||||||
|
|
||||||
while (defined($file = <FILES>)) {
|
while (defined($line = <STDIN>)) {
|
||||||
chomp $file;
|
($file) = split(/\s+/, $line, 2);
|
||||||
|
|
||||||
# Cheap test for files to ignore.
|
# These are binary and must be ignored.
|
||||||
next if $file =~ m%/\.#%; # CVS conflict files.
|
next if $file =~ m%/random.data|\.gif$%;
|
||||||
next if $file =~ m%/CVS/%; # CVS metafiles.
|
next if -B $file;
|
||||||
next if $file =~ m%\.[oa]$%; # Object and library files.
|
|
||||||
next if $file =~ m%/#[^/]+#$%; # Emacs autosave.
|
|
||||||
next if $file =~ m%~([0-9]+~)?$%; # Emacs version control.
|
|
||||||
|
|
||||||
# Generated by configure.
|
print "$file\n";
|
||||||
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;
|
|
||||||
|
|
||||||
unless (open(FILEIN, "< $file")) {
|
unless (open(FILEIN, "< $file")) {
|
||||||
warn "$0: open < $file: $!, skipping\n";
|
warn "$0: open < $file: $!, skipping\n";
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
undef $/; # Slurp whole file.
|
undef $/; # Slurp whole file.
|
||||||
$_ = <FILEIN>;
|
$_ = <FILEIN>;
|
||||||
$/ = "\n"; # Back to line-at-a-time for <FILES>.
|
$/ = "\n"; # Back to line-at-a-time for <FILES>.
|
||||||
|
Reference in New Issue
Block a user