From: James Mastros Date: Thu, 6 May 2004 14:45:53 +0000 (+0200) Subject: Add a small script to check whether a perl source tree X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=772ab6503ff18dfd6856d3c039bc0c327944f3f1;p=p5sagit%2Fp5-mst-13.2.git Add a small script to check whether a perl source tree (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 --- diff --git a/MANIFEST b/MANIFEST index 293b093..eead0b2 100644 --- a/MANIFEST +++ b/MANIFEST @@ -2572,6 +2572,7 @@ pod/splitman Splits perlfunc into multiple man pages 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 diff --git a/Porting/checkcase.pl b/Porting/checkcase.pl new file mode 100644 index 0000000..66dccd2 --- /dev/null +++ b/Porting/checkcase.pl @@ -0,0 +1,26 @@ +#!/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;