summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikhail Osipov <mike.osipov@gmail.com>2019-11-02 21:58:24 +0300
committerMikhail Osipov <mike.osipov@gmail.com>2019-11-02 21:58:24 +0300
commit67e57b207af80fa0383b3f97fe2ec505901c452d (patch)
tree35c29c99c91e998d6beeea640f276b6d0a67f6d0
parent830c608b6ce85d02756d1a7162508ac07001886c (diff)
linux kernel version check fix again
-rwxr-xr-xsys.sh2
1 files changed, 1 insertions, 1 deletions
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)