diff options
author | Karl Berry <karl@freefriends.org> | 2016-01-12 18:58:44 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-01-12 18:58:44 +0000 |
commit | d28f5069f43fb43706bdec5bb5fe3db3fcf33f69 (patch) | |
tree | 36f3f59d1b1a859794ba2f1d703c6bbf7be60cfb | |
parent | ab71272dc887ec428cdf2868adfd2c77431bdc48 (diff) |
remove duplicated README. cf. README, as with nucleardata
git-svn-id: svn://tug.org/texlive/trunk@39363 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-x | Master/tlpkg/libexec/place | 42 |
1 files changed, 34 insertions, 8 deletions
diff --git a/Master/tlpkg/libexec/place b/Master/tlpkg/libexec/place index d037d412bf8..eb79f35bb0a 100755 --- a/Master/tlpkg/libexec/place +++ b/Master/tlpkg/libexec/place @@ -67,14 +67,45 @@ my $TOP = getcwd (); &xchdir ("$cooked_top/$package"); my $cooked_pkg = getcwd (); +print "place: checking for case-insensitive clashes\n"; # Windows/Mac checkouts +my @caseclash = `find . -print | sort | uniq -i -d`; +die "place: case clashes: @caseclash\n" if @caseclash; + +print "place: checking for trailing dot clashes\n"; +# this typically happens with a README generated from a dtx, thus +# named "README.", and the package author also includes a +# manually-renamed README in the package. This causes a clash with +# Windows checkouts. So remove the README. if it's the same, else give up. +# (= have to do something in ctan2tds to fix it.) +# +my @trailingdots = `find . -type f -name \*. -print | sort`; +for my $dot (@trailingdots) { + chomp ($dot); + (my $nodot = $dot) =~ s/\.$//; + print "place: checking $dot vs. $nodot\n"; + next if ! -e $nodot; # just foo., no foo -- unlikely, but ok + if (system ("cmp -s $dot $nodot") == 0) { + print "place: same, removing dot: $dot\n"; + unlink ($dot) || die "unlink($dot) failed: $!"; + } else { + die "place: clash between $dot and $nodot; fix in ctan2ds\n"; + } +} +# we do those checks (and possible removals) before making the new TL +# package, so the "README." file doesn't get into the data structures. + + if (-d "Master") { # maybe have both Build and Master &xchdir ("Master"); $DEST = $TOP; } my $cooked_master = getcwd (); -if (-d "texmf-dist") { $Type = "Package"; } -else { die "$cooked_master: no top level texmf-dist"; } +if (-d "texmf-dist") { + $Type = "Package"; +} else { + die "$cooked_master: no top level texmf-dist"; +} die "top-level README under $TOP, that can't be right" if <*/README>; @@ -117,12 +148,7 @@ print "\n\f "; &compare_disk_vs_tlpobj ($cooked_master, $tlpnew); &show_tlp_diffs ($tlpnew, %Old); -&xchdir ($cooked_pkg); -print "place: checking for case-insensitive clashes\n"; -print `find . -prune -o -print | sort | uniq -i -d`; -print "\n"; - -# xx need svn cp, too. +# xx need svn cp, too? my ($new_build_files,$existing_build_files) = &build_files ($cooked_pkg,$DEST); my @new_build_files = @$new_build_files; |