From 8f377d1eaaa1cbc247b0fc462b1244ae6be8c73e Mon Sep 17 00:00:00 2001 From: Hin-Tak Leung Date: Wed, 2 Aug 2023 02:07:04 +0100 Subject: [PATCH] Fine tuning the regex from discussion in the last pull --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index e0b6510..03506fc 100755 --- a/install.sh +++ b/install.sh @@ -78,11 +78,11 @@ function get_kernel_version() { function check_kernel_headers() { VER_RUN=$(get_kernel_version) - VER_HDR=$(dpkg -L raspberrypi-kernel-headers | egrep -m1 "/lib/modules/[[:print:]]+/build" | awk -F'/' '{ print $4; }') + VER_HDR=$(dpkg -L raspberrypi-kernel-headers | egrep -m1 "/lib/modules/[^\/]+/build" | awk -F'/' '{ print $4; }') [ "X$VER_RUN" == "X$VER_HDR" ] && { return 0 } - VER_HDR=$(dpkg -L linux-headers-$VER_RUN | egrep -m1 "/lib/modules/[[:print:]]+/build" | awk -F'/' '{ print $4; }') + VER_HDR=$(dpkg -L linux-headers-$VER_RUN | egrep -m1 "/lib/modules/[^\/]+/build" | awk -F'/' '{ print $4; }') [ "X$VER_RUN" == "X$VER_HDR" ] && { return 0 }