From: Graham Knop Date: Mon, 23 Nov 2020 21:55:41 +0000 (+0100) Subject: refuse to package files differing only by case X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=adbdb6d2cf84c64cc92a9a4ba35b9d06f6ef8c59;p=p5sagit%2FDistar.git refuse to package files differing only by case --- diff --git a/lib/Distar/helpers/check-manifest b/lib/Distar/helpers/check-manifest index 0705c2e..f109c86 100755 --- a/lib/Distar/helpers/check-manifest +++ b/lib/Distar/helpers/check-manifest @@ -14,10 +14,21 @@ use ExtUtils::Manifest qw(filecheck maniread maniskip manicheck mkmanifest); } my $read = maniread; - my $skip = maniskip; + my @files = sort keys %$read; + + my %lc; + for my $file (@files) { + warn $file; + if (my $other = $lc{lc $file}) { + die "ERROR: Multiple files only differing by case:\n\t$file\n\t$other\n"; + } + $lc{lc $file} = $file; + } my @missing = filecheck; - my @remove = grep $skip->($_), sort keys %$read; + + my $skip = maniskip; + my @remove = grep $skip->($_), @files; exit 0 if !(@missing || @remove);