1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 08:08:50 -05:00

checksrc.bat: Fixed cannot find perl if installed but not in path

This commit is contained in:
Steve Holme 2016-03-05 21:03:40 +00:00
parent 05401b9a3b
commit 0ad6c72227

View File

@ -6,7 +6,7 @@ rem * / __| | | | |_) | |
rem * | (__| |_| | _ <| |___ rem * | (__| |_| | _ <| |___
rem * \___|\___/|_| \_\_____| rem * \___|\___/|_| \_\_____|
rem * rem *
rem * Copyright (C) 2014 - 2015, Steve Holme, <steve_holme@hotmail.com>. rem * Copyright (C) 2014 - 2016, Steve Holme, <steve_holme@hotmail.com>.
rem * rem *
rem * This software is licensed as described in the file COPYING, which rem * This software is licensed as described in the file COPYING, which
rem * you should have received as part of this distribution. The terms rem * you should have received as part of this distribution. The terms
@ -48,11 +48,18 @@ rem ***************************************************************************
shift & goto parseArgs shift & goto parseArgs
:prerequisites :prerequisites
rem Check we have Perl installed rem Check we have Perl in our path
echo %PATH% | findstr /I /C:"\Perl" 1>nul echo %PATH% | findstr /I /C:"\Perl" 1>nul
if errorlevel 1 ( if errorlevel 1 (
if not exist "%SystemDrive%\Perl" ( rem It isn't so check we have it installed and set the path if it is
if not exist "%SystemDrive%\Perl64" goto noperl if exist "%SystemDrive%\Perl" (
set "PATH=%PATH%;%SystemDrive%\Perl\bin"
) else (
if exist "%SystemDrive%\Perl64" (
set "PATH=%SystemDrive%\Perl64\bin;%PATH%"
) else (
goto noperl
)
) )
) )