diff options
author | Ian Lynagh <igloo@earth.li> | 2011-04-14 22:45:02 +0100 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2011-04-14 22:45:02 +0100 |
commit | 2555743c2b9d7408e8cf6f0fd1064651b37db08e (patch) | |
tree | dacd80995745970cfdb8509df1871d847730b88f /boot | |
parent | 734ebccb84c665f808b80b72aecef7fc75466204 (diff) | |
download | haskell-2555743c2b9d7408e8cf6f0fd1064651b37db08e.tar.gz |
Check for ^M in packages file when booting
If we find one then we print an error message and fail.
Diffstat (limited to 'boot')
-rwxr-xr-x | boot | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -24,6 +24,24 @@ while ($#ARGV ne -1) { } } +{ + local $/ = undef; + open FILE, "packages" or die "Couldn't open file: $!"; + binmode FILE; + my $string = <FILE>; + close FILE; + + if ($string =~ /\r/) { + print STDERR <<EOF; +Found ^M in packages. +Perhaps you need to run + git config --global core.autocrlf false +and re-check out the tree? +EOF + exit 1; + } +} + # Create libraries/*/{ghc.mk,GNUmakefile} system("/usr/bin/perl", "-w", "boot-pkgs") == 0 or die "Running boot-pkgs failed: $?"; |