2009-08-24 23:48:28 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
2009-08-26 04:44:59 +02:00
|
|
|
# Note: Copy this script to the source code repository and execute it
|
|
|
|
# from that location.
|
|
|
|
|
|
|
|
# Program for printing date.
|
2009-08-25 00:12:42 +02:00
|
|
|
ZR_DATEPATH='date'
|
2009-08-24 23:48:28 +02:00
|
|
|
|
2009-08-25 00:12:42 +02:00
|
|
|
if [ "$1" ]
|
2009-08-24 23:48:28 +02:00
|
|
|
then
|
|
|
|
ZR_DATEPATH=$1
|
|
|
|
fi
|
2009-08-23 06:19:15 +02:00
|
|
|
|
|
|
|
ZR_VERSION_FILE="src/zr/hgversion.h.inc"
|
|
|
|
|
|
|
|
ZR_PRODUCT_NAME="Zombie:Reloaded"
|
|
|
|
ZR_COPYRIGHT="Copyright (C) 2009 Greyscale, Richard Helgeby"
|
|
|
|
ZR_LICENSE="GNU GPL, Version 3"
|
2009-08-24 23:48:28 +02:00
|
|
|
ZR_DATE=$($ZR_DATEPATH -R)
|
2009-08-23 06:19:15 +02:00
|
|
|
|
|
|
|
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_VERSION VERSION" >> $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_LICENSE \"$ZR_LICENSE\"" >> $ZR_VERSION_FILE
|
2009-08-24 23:48:28 +02:00
|
|
|
echo "#define ZR_VER_DATE \"$ZR_DATE\"" >> $ZR_VERSION_FILE
|
|
|
|
|
2009-08-24 23:50:29 +02:00
|
|
|
echo "Updated $ZR_VERSION_FILE"
|