From 99c28e24b25819a97e508923d5da1edb6fa4cdd0 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 19 Feb 2020 22:28:45 +0000 Subject: doc git-svn-id: svn://tug.org/texlive/trunk@53848 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/bin/cmp-textfiles | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Master/tlpkg/bin') diff --git a/Master/tlpkg/bin/cmp-textfiles b/Master/tlpkg/bin/cmp-textfiles index d0b3e30a152..053020c2264 100755 --- a/Master/tlpkg/bin/cmp-textfiles +++ b/Master/tlpkg/bin/cmp-textfiles @@ -1,7 +1,8 @@ #!/usr/bin/env perl # $Id$ # Public domain. Originally written 2008, Karl Berry. -# Compare two files considering CR, LF, and CRLF as equivalent. , +# Compare two files considering CR, LF, and CRLF as equivalent, +# ignoring blank lines, # and ignoring %% lines (see below). # # Used in place and tlpkg-ctan-check in TeX Live. @@ -12,7 +13,7 @@ sub main { if (@ARGV != 2) { warn <) { + open (my $FILE, $fname) || die "open($fname) failed: $!"; + while (<$FILE>) { s/\r\n?/\n/g; next if /^\s*%%\s*$/; # ignore %% lines, see above. #warn "line is |$_|"; $ret .= $_; } - close (FILE) || warn "close($fname) failed: $!"; + close ($FILE) || warn "close($fname) failed: $!"; # if the file did not have a trailing newline, add one for purposes of # comparison, since it can slip in if we edit it, etc. -- cgit v1.2.3