From ebf95d1a539a67d13d805b20a21b80fc311e8229 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 4 Aug 2008 00:53:19 +0000 Subject: do not consider text files with just CR (Mac) line endings different from files with LF or CRLF line endings git-svn-id: svn://tug.org/texlive/trunk@10058 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/bin/cmp-textfiles | 45 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100755 Master/tlpkg/bin/cmp-textfiles (limited to 'Master/tlpkg/bin/cmp-textfiles') diff --git a/Master/tlpkg/bin/cmp-textfiles b/Master/tlpkg/bin/cmp-textfiles new file mode 100755 index 00000000000..439fa1c0f28 --- /dev/null +++ b/Master/tlpkg/bin/cmp-textfiles @@ -0,0 +1,45 @@ +#!/usr/bin/env perl +# $Id$ +# Public domain. Originally written 2008, Karl Berry. +# Compare two files considering CR, LF, and CRLF as equivalent. +# Used in place and tlpkg-ctan-check in TeX Live. + +exit (&main ()); + +sub main +{ + if (@ARGV != 2) { + warn <) { + s/\r\n?/\n/g; + #warn "line is |$_|"; + $ret .= $_; + } + close (FILE) || warn "close($fname) failed: $!"; + + return $ret; +} -- cgit v1.2.3