From a1546251a184dae81a34cf2ddda51934f7ce7157 Mon Sep 17 00:00:00 2001 From: Jan Macku Date: Mon, 13 Sep 2021 10:14:56 +0200 Subject: Translated using Weblate (Czech) Currently translated at 90.5% (143 of 158 strings) spec: Replace not working awk command with sed (#382) Sed command get version number from spec file and increment last number by one. Work like old awk command was intended to work. Source: https://stackoverflow.com/questions/14348432/how-to-find-replace-and-increment-a-matched-number-with-sed-awk/14348899 (cherry picked from commit bfda3cc2acdea827909e6c89bda5bbb5140cda6c) Co-authored-by: Jan Macku Translate-URL: https://translate.fedoraproject.org/projects/fedora-sysv/initscripts/cs/ Translation: fedora-sysv/initscripts --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 4d77e363..eb67cc0c 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ localstatedir = /var sharedstatedir = $(localstatedir)/lib VERSION := $(shell gawk '/Version:/ { print $$2 }' initscripts.spec) -NEXT_VERSION := $(shell gawk '/Version:/ { print $$2 + 0.01 }' initscripts.spec) +NEXT_VERSION := $(shell sed -nr 's/Version:[ ]*([0-9]*)\.([0-9]*)\.([0-9]*)/echo "\1\.\2\.$$((\3+1))"/gep' initscripts.spec) all: make-binaries make-translations -- cgit v1.2.1