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-12-26 21:27:22 +01:00
|
|
|
ZR_UNOFFICIAL=false
|
|
|
|
|
2009-08-25 00:12:42 +02:00
|
|
|
if [ "$1" ]
|
2009-08-24 23:48:28 +02:00
|
|
|
then
|
2009-12-26 21:27:22 +01:00
|
|
|
if [ "$1" = "--unofficial" ]
|
|
|
|
then
|
|
|
|
ZR_UNOFFICIAL=true
|
|
|
|
else
|
|
|
|
ZR_DATEPATH=$1
|
|
|
|
fi
|
2009-08-24 23:48:28 +02:00
|
|
|
fi
|
2009-08-23 06:19:15 +02:00
|
|
|
|
|
|
|
ZR_VERSION_FILE="src/zr/hgversion.h.inc"
|
|
|
|
|
|
|
|
ZR_PRODUCT_NAME="Zombie:Reloaded"
|
2013-01-12 08:47:36 +01:00
|
|
|
ZR_COPYRIGHT="Copyright (C) 2009-2013 Greyscale, Richard Helgeby"
|
|
|
|
ZR_BRANCH="zr-3.1"
|
2009-12-26 22:17:18 +01:00
|
|
|
ZR_REVISION=$(hg id -n):$(hg id -i)
|
|
|
|
|
|
|
|
if [ $ZR_UNOFFICIAL = "true" ]
|
|
|
|
then
|
2013-01-12 08:47:36 +01:00
|
|
|
ZR_REVISION="$ZR_REVISION+"
|
2009-12-26 22:17:18 +01:00
|
|
|
fi
|
|
|
|
|
2009-08-23 06:19:15 +02:00
|
|
|
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
|
2009-12-14 00:39:21 +01:00
|
|
|
echo "#define ZR_VER_BRANCH \"$ZR_BRANCH\"" >> $ZR_VERSION_FILE
|
2009-12-26 21:27:22 +01:00
|
|
|
echo "#define ZR_VER_REVISION \"$ZR_REVISION\"" >> $ZR_VERSION_FILE
|
2009-08-23 06:19:15 +02:00
|
|
|
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"
|