aboutsummaryrefslogtreecommitdiff
path: root/projects/checksrc.bat
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2016-03-05 21:03:40 +0000
committerSteve Holme <steve_holme@hotmail.com>2016-03-05 21:40:53 +0000
commit0ad6c7222799e32586fec6c2f061a0c82540b304 (patch)
treeda1907b2af247dba4c4141074ff96ea6677c0831 /projects/checksrc.bat
parent05401b9a3b14e3ecd647bd0624890805efc6c414 (diff)
checksrc.bat: Fixed cannot find perl if installed but not in path
Diffstat (limited to 'projects/checksrc.bat')
-rw-r--r--projects/checksrc.bat15
1 files changed, 11 insertions, 4 deletions
diff --git a/projects/checksrc.bat b/projects/checksrc.bat
index 39291f654..5359e5ff0 100644
--- a/projects/checksrc.bat
+++ b/projects/checksrc.bat
@@ -6,7 +6,7 @@ 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 * This software is licensed as described in the file COPYING, which
rem * you should have received as part of this distribution. The terms
@@ -48,11 +48,18 @@ rem ***************************************************************************
shift & goto parseArgs
:prerequisites
- rem Check we have Perl installed
+ rem Check we have Perl in our path
echo %PATH% | findstr /I /C:"\Perl" 1>nul
if errorlevel 1 (
- if not exist "%SystemDrive%\Perl" (
- if not exist "%SystemDrive%\Perl64" goto noperl
+ rem It isn't so check we have it installed and set the path if it is
+ if exist "%SystemDrive%\Perl" (
+ set "PATH=%PATH%;%SystemDrive%\Perl\bin"
+ ) else (
+ if exist "%SystemDrive%\Perl64" (
+ set "PATH=%SystemDrive%\Perl64\bin;%PATH%"
+ ) else (
+ goto noperl
+ )
)
)