aboutsummaryrefslogtreecommitdiff
path: root/project/Win32BuildSetup/extract_git_rev.bat
diff options
context:
space:
mode:
authorCrystalP <CrystalP@xbmc.org>2011-01-14 21:32:45 -0500
committerCrystalP <CrystalP@xbmc.org>2011-01-14 22:17:45 -0500
commiteb727638ed9f837e67ddfab4c2942039e4958a29 (patch)
treeb771fb7a80ff6101eb364e04c07ad8226d2f57bd /project/Win32BuildSetup/extract_git_rev.bat
parentf833d1ede1c7476265b6fdbde5eb29f55b776d67 (diff)
cosmetic
Diffstat (limited to 'project/Win32BuildSetup/extract_git_rev.bat')
-rw-r--r--project/Win32BuildSetup/extract_git_rev.bat20
1 files changed, 10 insertions, 10 deletions
diff --git a/project/Win32BuildSetup/extract_git_rev.bat b/project/Win32BuildSetup/extract_git_rev.bat
index a2b8202e10..dfd3c08e01 100644
--- a/project/Win32BuildSetup/extract_git_rev.bat
+++ b/project/Win32BuildSetup/extract_git_rev.bat
@@ -1,33 +1,33 @@
-@echo off
+@ECHO OFF
-rem Batch file output: %GIT_REV% variable, containing the git revision
+REM Batch file output: %GIT_REV% variable, containing the git revision
-rem Use tgit.exe of TortoiseGit if available
+REM Use tgit.exe of TortoiseGit if available
SET GITEXE="tgit.exe"
%GITEXE% --version > NUL 2>&1
-if errorlevel 1 goto :notgit
+IF errorlevel 1 GOTO :notgit
GOTO :extract
:notgit
-rem Fallback on msysgit - must be in the path
+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 1 GOTO :nogit
GOTO :extract
:nogit
-rem Failure - no git tool to extract information.
+REM Failure - no git tool to extract information.
SET GIT_REV=Unknown
GOTO :done
:extract
-set oldCurrentDir=%CD%
-cd ..\..
+SET oldCurrentDir=%CD%
+CD ..\..
FOR /F "tokens=1 delims= " %%A IN ('%GITEXE% rev-parse --short HEAD') DO SET GIT_REV=%%A
-cd %oldCurrentDir%
+CD %oldCurrentDir%
:done