1
0
mirror of https://git.tukaani.org/xz.git synced 2025-02-21 07:58:27 +00:00
Lasse Collin 6b50590725
version.sh: Omit an unwanted dot from development versions
It printed 5.7.0.alpha instead of 5.7.0alpha.

Fixes: e7a42cda7c827e016619e8cab15e2faf5d4181ae
2024-12-29 10:51:47 +02:00

22 lines
719 B
Bash

#!/bin/sh
# SPDX-License-Identifier: 0BSD
#############################################################################
#
# 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 \
| sed 'N; N; N; s/\n/./; s/\n/./; s/\n//g' \
| tr -d '\012\015\025'