Imported Upstream version 7.44.0
[platform/upstream/curl.git] / src / mkhelp.pl
index 7ed86f7..088a09a 100644 (file)
@@ -54,6 +54,9 @@ while (<STDIN>) {
     # this should be removed:
     $line =~ s/(\b.|_\b)//g;
 
+    # remove trailing CR from line. msysgit checks out files as line+CRLF
+    $line =~ s/\r$//;
+
     if($line =~ /^([ \t]*\n|curl)/i) {
         # cut off headers and empty lines
         $wline++; # count number of cut off lines
@@ -90,7 +93,12 @@ open(READ, "<$README") ||
     die "couldn't read the README infile $README";
 
 while(<READ>) {
-    push @out, $_;
+    my $line = $_;
+
+    # remove trailing CR from line. msysgit checks out files as line+CRLF
+    $line =~ s/\r$//;
+
+    push @out, $line;
 }
 close(READ);