From 67e57b207af80fa0383b3f97fe2ec505901c452d Mon Sep 17 00:00:00 2001 From: Mikhail Osipov Date: Sat, 2 Nov 2019 21:58:24 +0300 Subject: linux kernel version check fix again --- sys.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys.sh') diff --git a/sys.sh b/sys.sh index deb588d..4146384 100755 --- a/sys.sh +++ b/sys.sh @@ -16,7 +16,7 @@ function cuteol { done } -INSTALLED=$(file /boot/vmlinuz-linux | grep -o "[0-9a-z.-]\+-ARCH") +INSTALLED=$(file /boot/vmlinuz-linux | sed -n "s/^.*version \([^ ]\+\) .*$/\1/p") CURRENT=$(uname -r) KERNEL=$(echo $CURRENT | cut -d- -f1) -- cgit v1.2.3-70-g09d2