diff options
author | Erich Eckner <git@eckner.net> | 2018-01-30 06:37:18 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-01-30 06:37:18 +0100 |
commit | 49fb8d278d84cf07390e2e2391b36d9984373e7a (patch) | |
tree | 3ab6a77a5476c12ad142bc13f1879f9d55580e22 /check-kernel.in | |
parent | 4ac0964ca972b003ac619cb49d1229de26f13902 (diff) | |
download | check-kernel-49fb8d278d84cf07390e2e2391b36d9984373e7a.tar.xz |
check-kernel.in: trim trailing .0s
Diffstat (limited to 'check-kernel.in')
-rw-r--r-- | check-kernel.in | 12 |
1 files changed, 12 insertions, 0 deletions
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 |