aboutsummaryrefslogtreecommitdiff
path: root/projects
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2015-08-06 17:33:02 +0100
committerSteve Holme <steve_holme@hotmail.com>2015-08-06 18:53:30 +0100
commit0342ada31f36f4fb5fa3ef9a5c480a2d48cb4eb6 (patch)
tree7a808f22f4473df422c70727ede7b2b9ea625659 /projects
parent3f5f042e5d7850b9a66dc676d0b125503a425eb3 (diff)
generate.bat: Added a check for the presence of a git repository
Diffstat (limited to 'projects')
-rw-r--r--projects/generate.bat8
1 files changed, 8 insertions, 0 deletions
diff --git a/projects/generate.bat b/projects/generate.bat
index 5251e19f1..de4ff4dfb 100644
--- a/projects/generate.bat
+++ b/projects/generate.bat
@@ -38,6 +38,9 @@ rem If you need to set the errorlevel do this instead: CALL :seterr [#]
rem Switch to this batch file's directory
cd /d "%~0\.." 1>NUL 2>&1
+ rem Check we are running from a curl git repository
+ if not exist ..\GIT-INFO goto norepo
+
rem Set our variables
setlocal ENABLEEXTENSIONS
set VERSION=ALL
@@ -483,6 +486,11 @@ rem Returns exit code 0 on success or 1 on failure.
echo Error: This batch file cannot run from a network drive
goto error
+:norepo
+ echo.
+ echo Error: This batch file should only be used from a curl git repository
+ goto error
+
:nogencurlbuild
echo.
echo Error: Unable to generate ..\include\curl\curlbuild.h