aboutsummaryrefslogtreecommitdiff
path: root/project
diff options
context:
space:
mode:
authorCrystalP <CrystalP@xbmc.org>2012-01-01 19:53:04 -0500
committerCrystalP <CrystalP@xbmc.org>2012-01-01 20:29:45 -0500
commit9a7aa627cc17495a615a74bf835055e7cd14a967 (patch)
tree97f3c15d22acddab4957f9e70ad26cde1ab8f081 /project
parent22d0526e0f29101c18e33e948f0cb43869e11234 (diff)
[WIN] more correct git command detection.
The command interpreter returns 9009 when the program to be executed is not found. Also have to be careful when testing returned value as IF errorlevel x returns true for any errorlevel values >= x
Diffstat (limited to 'project')
-rw-r--r--project/Win32BuildSetup/extract_git_rev.bat4
1 files changed, 2 insertions, 2 deletions
diff --git a/project/Win32BuildSetup/extract_git_rev.bat b/project/Win32BuildSetup/extract_git_rev.bat
index 6dcc723411..fedeb4b8ff 100644
--- a/project/Win32BuildSetup/extract_git_rev.bat
+++ b/project/Win32BuildSetup/extract_git_rev.bat
@@ -6,7 +6,7 @@ REM Batch file output: %GIT_REV% variable, containing the git revision
REM Use tgit.exe of TortoiseGit if available
SET GITEXE="tgit.exe"
%GITEXE% --version > NUL 2>&1
-IF errorlevel 1 GOTO :notgit
+IF errorlevel 9009 IF NOT errorlevel 9010 GOTO :notgit
GOTO :extract
:notgit
@@ -14,7 +14,7 @@ GOTO :extract
REM Fallback on msysgit - must be in the path
SET GITEXE="git.exe"
%GITEXE% --help > NUL 2>&1
-IF errorlevel 1 GOTO :nogit
+IF errorlevel 9009 IF NOT errorlevel 9010 GOTO :nogit
GOTO :extract
:nogit