Commit 333c36b2 authored by Steve Holme's avatar Steve Holme
Browse files

checksrc.bat: Fixed error when [directory] isn't a curl source directory

The system cannot find the file specified.
parent 1ab763ac
Loading
Loading
Loading
Loading
+12 −6
Original line number Diff line number Diff line
@@ -62,16 +62,22 @@ rem ***************************************************************************

:start
  rem Check the src directory
  if exist %SRC_DIR%\src (
    for /f "delims=" %%i in ('dir "%SRC_DIR%\src\*.c.*" /b') do @perl "%SRC_DIR%\lib\checksrc.pl" "-D%SRC_DIR%\src" -Wtool_hugehelp.c "%%i"
    for /f "delims=" %%i in ('dir "%SRC_DIR%\src\*.h.*" /b') do @perl "%SRC_DIR%\lib\checksrc.pl" "-D%SRC_DIR%\src" "%%i"
  )

  rem Check the lib directory
  if exist %SRC_DIR%\lib (
    for /f "delims=" %%i in ('dir "%SRC_DIR%\lib\*.c.*" /b') do @perl "%SRC_DIR%\lib\checksrc.pl" "-D%SRC_DIR%\lib" "%%i"
    for /f "delims=" %%i in ('dir "%SRC_DIR%\lib\*.h.*" /b') do @perl "%SRC_DIR%\lib\checksrc.pl" "-D%SRC_DIR%\lib" -Wcurl_config.h.cmake "%%i"
  )

  rem Check the vtls directory
  if exist %SRC_DIR%\vtls (
    for /f "delims=" %%i in ('dir "%SRC_DIR%\lib\vtls\*.c.*" /b') do @perl "%SRC_DIR%\lib\checksrc.pl" "-D%SRC_DIR%\lib\vtls" "%%i"
    for /f "delims=" %%i in ('dir "%SRC_DIR%\lib\vtls\*.h.*" /b') do @perl "%SRC_DIR%\lib\checksrc.pl" "-D%SRC_DIR%\lib\vtls" "%%i"
  )

  goto success