diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2009-02-13 18:00:03 +0200 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2009-02-13 18:00:03 +0200 |
commit | fdbc0cfa71f7d660855098a609175ba384259529 (patch) | |
tree | ee4416f50124fbbb8142e14eeee345fa4236c726 /version.sh | |
parent | Fix handling of integrity check type in the xz command line tool. (diff) | |
download | xz-fdbc0cfa71f7d660855098a609175ba384259529.tar.xz |
Changed how the version number is specified in various places.
Now configure.ac will get the version number directly from
src/liblzma/api/lzma/version.h. The intent is to reduce the
number of places where the version number is duplicated. In
future, support for displaying Git commit ID may be added too.
Diffstat (limited to '')
-rw-r--r-- | version.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/version.sh b/version.sh new file mode 100644 index 00000000..404a9e2a --- /dev/null +++ b/version.sh @@ -0,0 +1,23 @@ +#!/bin/sh +# +############################################################################# +# +# Get the version string from version.h and print it out without +# trailing newline. This makes it suitable for use in configure.ac. +# +############################################################################# +# +# Author: Lasse Collin +# +# This file has been put into the public domain. +# You can do whatever you want with this file. +# +############################################################################# + +sed -n 's/LZMA_VERSION_STABILITY_ALPHA/alpha/ + s/LZMA_VERSION_STABILITY_BETA/beta/ + s/LZMA_VERSION_STABILITY_STABLE// + s/^#define LZMA_VERSION_[MPS][AIT][AJNT][A-Z]* //p' \ + src/liblzma/api/lzma/version.h \ + | tr '\n' '|' \ + | sed 's/|/./; s/|/./; s/|//g' |