mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-22 04:21:23 +00:00
comptime.bat: Windows 8.1 sucks
This commit is contained in:
parent
2f21c24d77
commit
873fa10fe1
1 changed files with 8 additions and 9 deletions
17
comptime.bat
17
comptime.bat
|
@ -1,4 +1,3 @@
|
|||
@ECHO OFF
|
||||
set BRA=Unknown
|
||||
set REV=illegal
|
||||
|
||||
|
@ -13,20 +12,20 @@ goto filwri
|
|||
:gitrev
|
||||
set GIT=%2
|
||||
if "%GIT%"=="" set GIT=git
|
||||
FOR /F "usebackq" %%s IN (`%GIT% rev-parse --abbrev-ref HEAD`) DO @SET BRA=%%s
|
||||
FOR /F "usebackq" %%s IN (`%GIT% rev-parse HEAD`) DO @SET REV=%%s
|
||||
for /f "usebackq" %%s in (`%GIT% rev-parse --abbrev-ref HEAD`) do @set BRA=%%s
|
||||
for /f "usebackq" %%s in (`%GIT% rev-parse HEAD`) do @set REV=%%s
|
||||
set REV=%REV:~0,8%
|
||||
goto filwri
|
||||
|
||||
:svnrev
|
||||
set BRA=Subversion
|
||||
FOR /F "usebackq" %%s IN (`svnversion .`) DO @SET REV=%%s
|
||||
for /f "usebackq" %%s in (`svnversion .`) do @set REV=%%s
|
||||
set REV=r%REV%
|
||||
goto filwri
|
||||
|
||||
:filwri
|
||||
ECHO // Do not edit! This file was autogenerated > %1\comptime.h
|
||||
ECHO // by the %0 batch file >> %1\comptime.h
|
||||
ECHO // >> %1\comptime.h
|
||||
ECHO const char* compbranch = "%BRA%"; >> %1\comptime.h
|
||||
ECHO const char* comprevision = "%REV%"; >> %1\comptime.h
|
||||
echo // Do not edit! This file was autogenerated > %1\comptime.h
|
||||
echo // by the %0 batch file >> %1\comptime.h
|
||||
echo // >> %1\comptime.h
|
||||
echo const char* compbranch = "%BRA%"; >> %1\comptime.h
|
||||
echo const char* comprevision = "%REV%"; >> %1\comptime.h
|
||||
|
|
Loading…
Reference in a new issue