From: Ian Lynagh Date: Thu, 14 Apr 2011 21:45:02 +0000 (+0100) Subject: Check for ^M in packages file when booting X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=2555743c2b9d7408e8cf6f0fd1064651b37db08e Check for ^M in packages file when booting If we find one then we print an error message and fail. --- diff --git a/boot b/boot index 9d7eb38..66bff3e 100755 --- a/boot +++ b/boot @@ -24,6 +24,24 @@ while ($#ARGV ne -1) { } } +{ + local $/ = undef; + open FILE, "packages" or die "Couldn't open file: $!"; + binmode FILE; + my $string = ; + close FILE; + + if ($string =~ /\r/) { + print STDERR <