diff options
author | Amitay Isaacs <amitay@gmail.com> | 2012-10-30 11:47:24 +1100 |
---|---|---|
committer | Amitay Isaacs <amitay@gmail.com> | 2012-10-30 11:55:59 +1100 |
commit | 92207245ba6aa5126d9d50f6f002b5efdb375338 (patch) | |
tree | 0dc39f610f4d8f5a5cd32c3adcc5f4039d5408ab /ctdb/packaging | |
parent | 2d1d5d312ed8e607213053f71d73f169443a93ec (diff) | |
download | samba-92207245ba6aa5126d9d50f6f002b5efdb375338.tar.gz |
packaging: Create include/version.h to define CTDB_VERSION_STRING
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit b151f9b62299ec5b887c62cef780547a39c0ba9d)
Diffstat (limited to 'ctdb/packaging')
-rwxr-xr-x | ctdb/packaging/mkversion.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ctdb/packaging/mkversion.sh b/ctdb/packaging/mkversion.sh index 7d12f680e25..18b432a30a1 100755 --- a/ctdb/packaging/mkversion.sh +++ b/ctdb/packaging/mkversion.sh @@ -22,6 +22,12 @@ # Common code to generate CTDB version string # +OUTPUT=$1 + +if [ -z "$OUTPUT" ]; then + OUTPUT="include/version.h" +fi + # We use tags and determine the version, as follows: # ctdb-0.9.1 (First release of 0.9). # ctdb-0.9.23 (23rd minor release of the 112 version) @@ -47,4 +53,12 @@ case "$TAG" in echo Invalid tag "$TAG" >&2 ;; esac + +cat > "$OUTPUT" <<EOF +/* This file is auto-genrated by packaging/mkversion.sh */ + +#define CTDB_VERSION_STRING "$VERSION" + +EOF + echo $VERSION |