aboutsummaryrefslogtreecommitdiff
path: root/scripts/gen_version_info.sh
diff options
context:
space:
mode:
authorPjotr Prins2017-10-26 08:07:28 +0000
committerPjotr Prins2017-10-26 08:07:28 +0000
commit3f2ebeba716ccc04f08e4245db4ffbc377c10206 (patch)
tree566fb7c2b5e8268ebc7d871c2fc88e1ca83c06b3 /scripts/gen_version_info.sh
parentf9eacf6637b091c794a4692cfd0646c9a5bcf35a (diff)
downloadpangemma-3f2ebeba716ccc04f08e4245db4ffbc377c10206.tar.gz
VERSION now contains the GEMMA version number. A script generates a header
file named ./src/version.h. See Makefile for details.
Diffstat (limited to 'scripts/gen_version_info.sh')
-rwxr-xr-xscripts/gen_version_info.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/gen_version_info.sh b/scripts/gen_version_info.sh
new file mode 100755
index 0000000..8a9e38d
--- /dev/null
+++ b/scripts/gen_version_info.sh
@@ -0,0 +1,12 @@
+#! /bin/bash
+#
+# Script to generate the version info of GEMMA and its environment
+# in ./src/version.h
+
+DATE=$(date "+%Y/%m/%d")
+YEAR=$(date "+%Y")
+
+echo // version.h generated by GEMMA $0
+echo \#define GEMMA_VERSION \"$(cat ./VERSION)\"
+echo \#define GEMMA_DATE \"$DATE\"
+echo \#define GEMMA_YEAR \"$YEAR\"