From 49fb8d278d84cf07390e2e2391b36d9984373e7a Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 30 Jan 2018 06:37:18 +0100 Subject: check-kernel.in: trim trailing .0s --- check-kernel.in | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/check-kernel.in b/check-kernel.in index 9c2f2e4..b25b0c7 100644 --- a/check-kernel.in +++ b/check-kernel.in @@ -99,6 +99,18 @@ else tail -n1 ) fi +installed=$( + printf '%s\n' "${installed}" | \ + sed ' + s/\(\.0\)\+$// + ' +) +running=$( + printf '%s\n' "${running}" | \ + sed ' + s/\(\.0\)\+$// + ' +) if [ -z "${installed}" ] || \ [ "$(echo "${installed}" | wc -l)" -ne 1 ]; then -- cgit v1.2.3-70-g09d2