(with or without generated files) is friendly with
case-insensitive filesystems.
Adapted from :
Subject: Re: STerm.pl vs Sterm.pl
Message-ID: <
20040506124556.2402.qmail@onion.perl.org>
p4raw-id: //depot/perl@22793
pod/splitpod Splits perlfunc into multiple pod pages
Policy_sh.SH Hold site-wide preferences between Configure runs.
Porting/apply Apply patches sent by mail
+Porting/checkcase.pl Check whether we are case-insensitive-fs-friendly
Porting/check83.pl Check whether we are 8.3-friendly
Porting/checkURL.pl Check whether we have working URLs
Porting/checkVERSION.pl Check whether we have $VERSIONs
--- /dev/null
+#!/usr/bin/perl
+# Finds the files that have the same name, case insensitively,
+# in the current directory and its subdirectories
+
+use warnings;
+use strict;
+use File::Find;
+
+my %files;
+find(sub {
+ my $name = $File::Find::name;
+ # Assumes that the path separator is exactly one character.
+ $name =~ s/^\.\..//;
+ push @{$files{lc $name}}, $name;
+ }, '.');
+
+my $failed;
+
+foreach (values %files) {
+ if (@$_ > 1) {
+ print join(", ", @$_), "\n";
+ $failed++;
+ }
+}
+
+print "no similarly named files found\n" unless $failed;