summaryrefslogtreecommitdiff
path: root/Build/cdbuild/dupl.pl
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2005-12-27 23:56:17 +0000
committerKarl Berry <karl@freefriends.org>2005-12-27 23:56:17 +0000
commit577983747d8680b8defbfdd03a9d50bad6fd54b7 (patch)
tree16b160f53c6c4c309c07db2c5b095d3abb16f69a /Build/cdbuild/dupl.pl
parent07fed0169bae91dfb5616f9d19e7969727e19d4d (diff)
initial Build
git-svn-id: svn://tug.org/texlive/trunk@4 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/cdbuild/dupl.pl')
-rw-r--r--Build/cdbuild/dupl.pl76
1 files changed, 76 insertions, 0 deletions
diff --git a/Build/cdbuild/dupl.pl b/Build/cdbuild/dupl.pl
new file mode 100644
index 00000000000..c98ac231bb3
--- /dev/null
+++ b/Build/cdbuild/dupl.pl
@@ -0,0 +1,76 @@
+#!/bin/perl
+use English;
+use Getopt::Long;
+use FileHandle;
+use File::Basename;
+use File::Find;
+use Cwd;
+$_=`kpsewhich -expand-var '\$TEXMFDIST'`;
+chop;
+print "texmf is rooted at $_\n";
+chdir $_ || die "cannot change directory to [$_]\n";
+&Check("tex");
+&Check("tex/plain");
+&Check("tex/generic");
+&Check("tex/latex");
+&Check("doc");
+&Check("source");
+&Check("fonts");
+
+sub Check{
+(my $Dir) = @_;
+print "\nDUPLICATES in $Dir\n";
+find(\&lfiles,$Dir);
+foreach $i (sort keys %Files) {
+ $_ = $Files{$i};
+ if (/ /) { print "$i: $_\n";
+ @d=split(" ",$_,);
+ foreach (@d) {
+ system "ls -l $_/$i >> /tmp/$$.log";
+ }
+ open (L,"/tmp/$$.log") || die "where is /tmp/$$.log?";
+ while (<L>) { print " $_";}
+ close L;
+ unlink "/tmp/$$.log";
+ }
+ $Files{$i}="";
+}
+}
+sub lfiles {
+ if (-f) {
+ if (/README/) {}
+ elsif (/MANIFEST/) {}
+ elsif (/TODO/) {}
+ elsif (/makefile/) {}
+ elsif (/Makefile/) {}
+ elsif (/READ.ME/) {}
+ elsif (/readme/) {}
+ elsif (/patch/) {}
+ elsif (/Change/) {}
+ elsif (/CHANGE/) {}
+ elsif (/FILE/) {}
+ elsif (/NOTE/) {}
+ elsif (/INSTALL/) {}
+ elsif (/install\.*/) {}
+ elsif (/NEWS/) {}
+ elsif (/CATALOG/) {}
+ elsif (/catalog/) {}
+ elsif (/changes\.*/) {}
+ elsif (/ANNOUNCE/) {}
+ elsif (/COPY/) {}
+ elsif (/node.*html/) {}
+ elsif (/index.html/) {}
+ elsif (/example.*tex/) {}
+ elsif (/example.*dvi/) {}
+ elsif (/sample.*tex/) {}
+ elsif (/sample.*dvi/) {}
+ elsif (/\.pk$/) {}
+ elsif (/\.gif$/) {}
+ elsif (/\.inl$/) {}
+else
+ { $dir=$File::Find::dir;
+ if ( $Files{$_} ne "") { $Files{$_} .= " $dir"; }
+ else { $Files{$_}=$dir; }}
+ }
+}
+