1
0
Fork 0
mirror of https://git.tukaani.org/xz.git synced 2024-04-04 12:36:23 +02:00
xz-archive/build-aux/version.sh
Lasse Collin 689e0228ba Change most public domain parts to 0BSD.
Translations and doc/xz-file-format.txt and doc/lzma-file-format.txt
were not touched.

COPYING.0BSD was added.
2024-02-14 18:31:12 +02:00

21 lines
685 B
Bash

#!/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
#
#############################################################################
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' \
| tr -d '\r\n'