diff --git a/sbin/kernel-getlast.sh b/sbin/kernel-getlast.sh index 8018843..1549409 100755 --- a/sbin/kernel-getlast.sh +++ b/sbin/kernel-getlast.sh @@ -1,6 +1,6 @@ #!/bin/bash -kernel_regex=`kernel-config list | grep \* | cut -d" " -f6 | sed 's~[0-9]*\.[0-9]*\.[0-9]*~[0-9]*\.[0-9]*\.[0-9]*~ ; s~-r[0-9]*$~.*~'` +kernel_regex=`kernel-config list | grep \* | cut -d" " -f6 | sed 's~[0-9]*\.[0-9]*\.[0-9]*~[0-9]*\.[0-9]*\.[0-9]*~ ; s~-r[0-9]*$~~; s~$~\\\(-r[0-9]\\\)\\\?~'` [ "" == "$kernel_regex" ] && echo "kernel_regex build failed ;-(" && exit -1 new_kernel=`kernel-config list | cut -d" " -f6 | grep ^$kernel_regex$ | sort -V | tail -n1`