From f6b861f12d070ba931d829505bfd3229653f5df2 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Mon, 25 Jan 2021 12:13:54 +0000 Subject: Fix unnecessary begin blocks in Perl source files. --- tools/mkheaders | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'tools/mkheaders') diff --git a/tools/mkheaders b/tools/mkheaders index 0569ec422..0ca593584 100755 --- a/tools/mkheaders +++ b/tools/mkheaders @@ -18,15 +18,7 @@ # -BEGIN { - require 5.10.0; - unless (-f 'configure') { - print "Error: $0 must be run from the main source directory!\n"; - exit 1; - } -} - -use feature ':5.10'; +use v5.10.0; use strict; use warnings FATAL => qw(all); @@ -49,11 +41,12 @@ my @ignored_revisions = ( 'f2acdbc3820f0f4f5ef76a0a64e73d2a320df91f', # peavey fixing line endings ); -my @paths = File::Util->new->list_dir('.' => { recurse => 1 }); +my @paths = File::Util->new->list_dir(dirname($RealDir) => { recurse => 1 }); my @updated; for my $path (@paths) { next unless -f $path; next if $path =~ /\/\./; + next if $path =~ /\/build\//; next if $path =~ /\/vendor\//; if (system "git ls-files --error-unmatch -- $path 1>/dev/null 2>/dev/null") { -- cgit v1.2.3