From f59c390d5d79a57f95765e1fe53e1547769698b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A8=D0=B0=D1=88=D0=BA=D0=B8=D0=BD=20=D0=9D=D0=B8=D0=BA?= =?UTF-8?q?=D0=BE=D0=BB=D0=B0=D0=B9?= Date: Mon, 5 Jun 2023 16:52:43 +0300 Subject: [PATCH] rm -r[0-9]+ from kernel version --- sbin/kernel-getlast.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sbin/kernel-getlast.sh b/sbin/kernel-getlast.sh index 599b400..db8b0da 100755 --- a/sbin/kernel-getlast.sh +++ b/sbin/kernel-getlast.sh @@ -58,14 +58,14 @@ kernel-config set $new_kernel kernel-clean.sh [ 0 -ne $? ] && echo "kernel-clean.sh failed ;-(" && exit -1 -vmlinuz_file=/boot/`echo $new_kernel | sed 's~^linux~vmlinuz~'` +vmlinuz_file=/boot/`echo $new_kernel | sed 's~^linux~vmlinuz~;s~-r[0-9]\+~~'` [ "" == "$vmlinuz_file" ] && echo "vmlinuz_file == \"\"" && exit -1 -vmlinuz_file_x86_64=/boot/`echo $new_kernel | sed 's~^linux~vmlinuz~'`-x86_64 +vmlinuz_file_x86_64=/boot/`echo $new_kernel | sed 's~^linux~vmlinuz~;s~-r[0-9]\+~~'`-x86_64 [ "" == "$vmlinuz_file_x86_64" ] && echo "vmlinuz_file_x86_64 == \"\"" && exit -1 march=`uname -m` -genkernel_file=/boot/`echo $new_kernel | sed "s~^linux~kernel-genkernel-${march}~"` +genkernel_file=/boot/`echo $new_kernel | sed "s~^linux~kernel-genkernel-${march}~;s~-r[0-9]\+~~"` [ "" == "$genkernel_file" ] && echo "genkernel_file == \"\"" && exit -1 if [[ ! -f "$vmlinuz_file" && ! -f "$vmlinuz_file_x86_64" && ! -f "$genkernel_file" || 1 -eq $FORCE_REBUILD ]]; then kernel-rebuild.sh $KERNEL_REBUILD_ARGS