mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 15:48:49 -05:00
newlines: fix mixed newlines to LF-only
I use the curl repo mainly on Windows with the typical Windows git checkout which converts the LF line endings in the curl repo to CRLF automatically on checkout. The automatic conversion is not done on files in the repo with mixed line endings. I recently noticed some weird output with projects/build-openssl.bat that I traced back to mixed line endings, so I scanned the repo and there are files (excluding the test data) that have mixed line endings. I used this command below to do the scan. Unfortunately it's not as easy as git grep, at least not on Windows. This gets the names of all the files in the repo's HEAD, gets each of those files raw from HEAD, checks for mixed line endings of both LF and CRLF, and prints the name if mixed. I excluded path tests/data/test* because those can have mixed line endings if I understand correctly. for f in `git ls-tree --name-only --full-tree -r HEAD`; do if [ -n "${f##tests/data/test*}" ]; then git show "HEAD:$f" | \ perl -0777 -ne 'exit 1 if /([^\r]\n.*\r\n)|(\r\n.*[^\r]\n)/'; if [ $? -ne 0 ]; then echo "$f"; fi; fi; done
This commit is contained in:
parent
82b8b6865c
commit
006b61eb0b
2
maketgz
2
maketgz
@ -9,7 +9,7 @@
|
|||||||
# | (__| |_| | _ <| |___
|
# | (__| |_| | _ <| |___
|
||||||
# \___|\___/|_| \_\_____|
|
# \___|\___/|_| \_\_____|
|
||||||
#
|
#
|
||||||
# Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
# Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
#
|
#
|
||||||
# This software is licensed as described in the file COPYING, which
|
# This software is licensed as described in the file COPYING, which
|
||||||
# you should have received as part of this distribution. The terms
|
# you should have received as part of this distribution. The terms
|
||||||
|
@ -86,9 +86,9 @@ rem ***************************************************************************
|
|||||||
shift & goto parseArgs
|
shift & goto parseArgs
|
||||||
|
|
||||||
:prerequisites
|
:prerequisites
|
||||||
rem Default the start directory if one isn't specified
|
rem Default the start directory if one isn't specified
|
||||||
if not defined START_DIR set START_DIR=..\..\openssl
|
if not defined START_DIR set START_DIR=..\..\openssl
|
||||||
|
|
||||||
rem Calculate the program files directory
|
rem Calculate the program files directory
|
||||||
if defined PROGRAMFILES (
|
if defined PROGRAMFILES (
|
||||||
set "PF=%PROGRAMFILES%"
|
set "PF=%PROGRAMFILES%"
|
||||||
@ -104,9 +104,9 @@ rem ***************************************************************************
|
|||||||
|
|
||||||
rem Check we have Visual Studio installed
|
rem Check we have Visual Studio installed
|
||||||
if not exist "%PF%\%VC_PATH%" goto novc
|
if not exist "%PF%\%VC_PATH%" goto novc
|
||||||
|
|
||||||
rem Check the start directory exists
|
rem Check the start directory exists
|
||||||
if not exist "%START_DIR%" goto noopenssl
|
if not exist "%START_DIR%" goto noopenssl
|
||||||
|
|
||||||
:configure
|
:configure
|
||||||
if "%BUILD_PLATFORM%" == "" (
|
if "%BUILD_PLATFORM%" == "" (
|
||||||
@ -260,7 +260,7 @@ rem ***************************************************************************
|
|||||||
:syntax
|
:syntax
|
||||||
rem Display the help
|
rem Display the help
|
||||||
echo.
|
echo.
|
||||||
echo Usage: build-openssl ^<compiler^> ^<platform^> [configuration] [directory]
|
echo Usage: build-openssl ^<compiler^> ^<platform^> [configuration] [directory]
|
||||||
echo.
|
echo.
|
||||||
echo Compiler:
|
echo Compiler:
|
||||||
echo.
|
echo.
|
||||||
@ -308,16 +308,16 @@ rem ***************************************************************************
|
|||||||
echo Error: %VC_DESC% is not installed
|
echo Error: %VC_DESC% is not installed
|
||||||
goto error
|
goto error
|
||||||
|
|
||||||
:nox64
|
:nox64
|
||||||
echo.
|
echo.
|
||||||
echo Error: %VC_DESC% does not support 64-bit builds
|
echo Error: %VC_DESC% does not support 64-bit builds
|
||||||
goto error
|
goto error
|
||||||
|
|
||||||
:noopenssl
|
:noopenssl
|
||||||
echo.
|
echo.
|
||||||
echo Error: Cannot locate OpenSSL source directory
|
echo Error: Cannot locate OpenSSL source directory
|
||||||
goto error
|
goto error
|
||||||
|
|
||||||
:error
|
:error
|
||||||
if "%OS%" == "Windows_NT" endlocal
|
if "%OS%" == "Windows_NT" endlocal
|
||||||
exit /B 1
|
exit /B 1
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
@echo OFF
|
@echo OFF
|
||||||
@del %OUTFILE%
|
@del %OUTFILE%
|
||||||
@echo %MACRO_NAME% = \> %OUTFILE%
|
@echo %MACRO_NAME% = \> %OUTFILE%
|
||||||
@for %%i in (%*) do @echo %DIROBJ%/%%i \>> %OUTFILE%
|
@for %%i in (%*) do @echo %DIROBJ%/%%i \>> %OUTFILE%
|
||||||
@echo. >> %OUTFILE%
|
@echo. >> %OUTFILE%
|
||||||
:END
|
:END
|
||||||
|
Loading…
Reference in New Issue
Block a user