From 4aee1f9cf5c46f56c12181f3c1bcb84466b6789c Mon Sep 17 00:00:00 2001 From: Steve Holme Date: Sat, 8 Aug 2015 11:04:55 +0100 Subject: scripts: Allow -help to be specified in any argument Allow the -help command line argument to be specified in any argument and not just as the first. --- projects/generate.bat | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'projects/generate.bat') diff --git a/projects/generate.bat b/projects/generate.bat index de4ff4dfb..36778e810 100644 --- a/projects/generate.bat +++ b/projects/generate.bat @@ -58,11 +58,6 @@ rem If you need to set the errorlevel do this instead: CALL :seterr [#] gzip --version NUL 2>&1 if %ERRORLEVEL% equ 0 (set HAVE_GZIP=Y) else (set HAVE_GZIP=) - rem Display the help - if /i "%~1" == "-?" goto syntax - if /i "%~1" == "-h" goto syntax - if /i "%~1" == "-help" goto syntax - :parseArgs if "%~1" == "" goto start @@ -86,6 +81,12 @@ rem If you need to set the errorlevel do this instead: CALL :seterr [#] set VERSION=VC14 ) else if /i "%~1" == "-clean" ( set MODE=CLEAN + ) else if /i "%~1" == "-?" ( + goto syntax + ) else if /i "%~1" == "-h" ( + goto syntax + ) else if /i "%~1" == "-help" ( + goto syntax ) else ( goto unknown ) -- cgit v1.2.3