summaryrefslogtreecommitdiff
path: root/projects
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2015-08-08 11:21:49 +0100
committerSteve Holme <steve_holme@hotmail.com>2015-08-08 11:36:47 +0100
commit1ab763acce1151c502d269ff28839ca08b142050 (patch)
tree459682d941ddf87d5cdb140689674615c7e3ecfd /projects
parenta8e9e0c205ac27ef73d1ae09327be4e89b90894c (diff)
downloadcurl-1ab763acce1151c502d269ff28839ca08b142050.tar.gz
checksrc.bat: Added check for unknown arguments
Diffstat (limited to 'projects')
-rw-r--r--projects/checksrc.bat18
1 files changed, 16 insertions, 2 deletions
diff --git a/projects/checksrc.bat b/projects/checksrc.bat
index 23d3aa2e7..0632b2f64 100644
--- a/projects/checksrc.bat
+++ b/projects/checksrc.bat
@@ -29,14 +29,24 @@ rem ***************************************************************************
setlocal
:parseArgs
+ if "%~1" == "" goto prerequisites
+
if /i "%~1" == "-?" (
goto syntax
) else if /i "%~1" == "-h" (
goto syntax
) else if /i "%~1" == "-help" (
goto syntax
+ ) else (
+ if not defined SRC_DIR (
+ set SRC_DIR=%~1%
+ ) else (
+ goto unknown
+ )
)
+ shift & goto parseArgs
+
:prerequisites
rem Check we have Perl installed
echo %PATH% | findstr /I /C:"\Perl" 1>nul
@@ -47,8 +57,7 @@ rem ***************************************************************************
)
:configure
- if "%1" == "" set SRC_DIR=..
- if not "%1" == "" set SRC_DIR=%~1%
+ if "%SRC_DIR%" == "" set SRC_DIR=..
if not exist "%SRC_DIR%" goto nosrc
:start
@@ -74,6 +83,11 @@ rem ***************************************************************************
echo directory - Specifies the curl source directory
goto success
+:unknown
+ echo.
+ echo Error: Unknown argument '%1'
+ goto error
+
:nodos
echo.
echo Error: Only a Windows NT based Operating System is supported