From 27a29220e2e99ac80da212f98dd362d48c67a826 Mon Sep 17 00:00:00 2001 From: richard Date: Mon, 24 Aug 2009 23:48:28 +0200 Subject: [PATCH 1/3] Updated script for dumping version info, and new windows batch file. --- updateversion.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/updateversion.sh b/updateversion.sh index 7f9793d..d33a08f 100755 --- a/updateversion.sh +++ b/updateversion.sh @@ -1,10 +1,19 @@ -#/bin/sh +#!/bin/sh + +# Program for printing date. +ZR_DATEPATH=date + +if [ -n $1 ] +then + ZR_DATEPATH=$1 +fi 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" +ZR_DATE=$($ZR_DATEPATH -R) echo "#define ZR_VER_PRODUCT_NAME \"$ZR_PRODUCT_NAME\"" > $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_REVISION \"$(hg id -n):$(hg id -i)\"" >> $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 hgversion.h.inc" From be5ee9dfb3c0f40b5f99f94e343a2b1874a45b71 Mon Sep 17 00:00:00 2001 From: richard Date: Mon, 24 Aug 2009 23:50:29 +0200 Subject: [PATCH 2/3] Fixed typo in updateversion.sh. --- updateversion.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/updateversion.sh b/updateversion.sh index d33a08f..0b5db86 100755 --- a/updateversion.sh +++ b/updateversion.sh @@ -1,6 +1,6 @@ #!/bin/sh -# Program for printing date. +# Command for printing date. ZR_DATEPATH=date if [ -n $1 ] @@ -23,4 +23,4 @@ echo "#define ZR_VER_REVISION \"$(hg id -n):$(hg id -i)\"" >> $ZR_VERSIO echo "#define ZR_VER_LICENSE \"$ZR_LICENSE\"" >> $ZR_VERSION_FILE echo "#define ZR_VER_DATE \"$ZR_DATE\"" >> $ZR_VERSION_FILE -echo "Updated hgversion.h.inc" +echo "Updated $ZR_VERSION_FILE" From 5f2371aa512890fffb7f2082f7937f0a8c16e75e Mon Sep 17 00:00:00 2001 From: richard Date: Tue, 25 Aug 2009 00:12:42 +0200 Subject: [PATCH 3/3] Fixed parameter parsing bug in updateversion.sh. Added forgotten windows script. --- updateversion.bat | 4 ++++ updateversion.sh | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 updateversion.bat diff --git a/updateversion.bat b/updateversion.bat new file mode 100644 index 0000000..e5cc147 --- /dev/null +++ b/updateversion.bat @@ -0,0 +1,4 @@ +set BASH=..\zr-devenv\win32\bin\bash.exe +set DATEPATH=../zr-devenv/win32/bin/date.exe + +%BASH% updateversion.sh %DATEPATH% diff --git a/updateversion.sh b/updateversion.sh index 0b5db86..1625d60 100755 --- a/updateversion.sh +++ b/updateversion.sh @@ -1,9 +1,9 @@ #!/bin/sh # Command for printing date. -ZR_DATEPATH=date +ZR_DATEPATH='date' -if [ -n $1 ] +if [ "$1" ] then ZR_DATEPATH=$1 fi