This commit is contained in:
Greyscale 2009-08-25 13:07:50 -07:00
commit 34c6f853ff
2 changed files with 17 additions and 2 deletions

4
updateversion.bat Normal file
View File

@ -0,0 +1,4 @@
set BASH=..\zr-devenv\win32\bin\bash.exe
set DATEPATH=../zr-devenv/win32/bin/date.exe
%BASH% updateversion.sh %DATEPATH%

View File

@ -1,10 +1,19 @@
#/bin/sh #!/bin/sh
# Command for printing date.
ZR_DATEPATH='date'
if [ "$1" ]
then
ZR_DATEPATH=$1
fi
ZR_VERSION_FILE="src/zr/hgversion.h.inc" ZR_VERSION_FILE="src/zr/hgversion.h.inc"
ZR_PRODUCT_NAME="Zombie:Reloaded" ZR_PRODUCT_NAME="Zombie:Reloaded"
ZR_COPYRIGHT="Copyright (C) 2009 Greyscale, Richard Helgeby" ZR_COPYRIGHT="Copyright (C) 2009 Greyscale, Richard Helgeby"
ZR_LICENSE="GNU GPL, Version 3" ZR_LICENSE="GNU GPL, Version 3"
ZR_DATE=$($ZR_DATEPATH -R)
echo "#define ZR_VER_PRODUCT_NAME \"$ZR_PRODUCT_NAME\"" > $ZR_VERSION_FILE echo "#define ZR_VER_PRODUCT_NAME \"$ZR_PRODUCT_NAME\"" > $ZR_VERSION_FILE
echo "#define ZR_VER_COPYRIGHT \"$ZR_COPYRIGHT\"" >> $ZR_VERSION_FILE echo "#define ZR_VER_COPYRIGHT \"$ZR_COPYRIGHT\"" >> $ZR_VERSION_FILE
@ -12,4 +21,6 @@ echo "#define ZR_VER_VERSION VERSION" >> $ZR_VERSION_FILE
echo "#define ZR_VER_BRANCH \"$(hg id -b)\"" >> $ZR_VERSION_FILE echo "#define ZR_VER_BRANCH \"$(hg id -b)\"" >> $ZR_VERSION_FILE
echo "#define ZR_VER_REVISION \"$(hg id -n):$(hg id -i)\"" >> $ZR_VERSION_FILE echo "#define ZR_VER_REVISION \"$(hg id -n):$(hg id -i)\"" >> $ZR_VERSION_FILE
echo "#define ZR_VER_LICENSE \"$ZR_LICENSE\"" >> $ZR_VERSION_FILE echo "#define ZR_VER_LICENSE \"$ZR_LICENSE\"" >> $ZR_VERSION_FILE
echo "#define ZR_VER_DATE \"$(date)\"" >> $ZR_VERSION_FILE echo "#define ZR_VER_DATE \"$ZR_DATE\"" >> $ZR_VERSION_FILE
echo "Updated $ZR_VERSION_FILE"