]> granicus.if.org Git - php/commitdiff
- Fixed bug #27368 (php.ini-* has lone CR in the end)
authorfoobar <sniper@php.net>
Wed, 25 Feb 2004 23:38:03 +0000 (23:38 +0000)
committerfoobar <sniper@php.net>
Wed, 25 Feb 2004 23:38:03 +0000 (23:38 +0000)
# regex taken from win32/sendmail.c (suggested by Sara)
# And Andrei invited Wez to his speech on the cruise.. :)

win32/build/mkdist.php

index 646e9cdadc1d2d627d04e924618936263d929d31..bb8017af82aa9167a5ad4a4ef388a5019764f9f2 100644 (file)
@@ -128,7 +128,7 @@ function copy_file_list($source_dir, $dest_dir, $list)
 function copy_text_file($source, $dest)
 {
        $text = file_get_contents($source);
-       $text = preg_replace("/[^\r]\n$/", "\r\n", $text);
+       $text = preg_replace("/(\r\n?)|\n/", "\r\n", $text);
        $fp = fopen($dest, "w");
        fwrite($fp, $text);
        fclose($fp);
@@ -161,6 +161,7 @@ $text_files = array(
        "NEWS" =>                       "news.txt",
        "php.ini-dist" =>       "php.ini-dist",
        "php.ini-recommended" => "php.ini-recommended",
+       "win32/install.txt" =>  "install.txt",
 );
 
 foreach ($text_files as $src => $dest) {
@@ -169,7 +170,6 @@ foreach ($text_files as $src => $dest) {
 
 /* general other files */
 $general_files = array(
-       "win32/install.txt" =>  "install.txt",
        "php.gif"                       =>      "php.gif",
 );