Plippo / asus-wmi-screenpad

Variation of the asus-wmi kernel module with screenpad brightness support
Other
166 stars 23 forks source link

prepare-for-current-kernel.sh incorrect patch detection #58

Open nalim opened 10 months ago

nalim commented 10 months ago

Detection of kernel patch is broken after the last update of prepare-for-current-kernel.sh. There is no kernel 6.19 yet, so all current kernels (like 6.6) are patched by the old patch6.0, not by the newer patch6.2.

elif { echo $VERSION ; echo "6.19" ; } | sort -V -c 2>/dev/null then PATCHFILE="patch6.0" else PATCHFILE="patch6.2" fi

nalim commented 10 months ago

maybe this?

diff --git a/prepare-for-current-kernel.sh b/prepare-for-current-kernel.sh
index 4e8d828..f1eed2b 100755
--- a/prepare-for-current-kernel.sh
+++ b/prepare-for-current-kernel.sh
@@ -1,5 +1,6 @@
 #!/bin/sh
 VERSION=`uname -r | grep -o '^[0-9]\+\.[0-9]\+'`
+VERSION2=`uname -r | grep -o '^[0-9]\+\.[0-9]\+\.[0-9]'`

 if { echo $VERSION ; echo "5.7" ; } | sort -V -c 2>/dev/null
 then
@@ -7,7 +8,7 @@ then
 elif { echo $VERSION ; echo "5.99" ; } | sort -V -c 2>/dev/null
 then
   PATCHFILE="patch5.8"
-elif { echo $VERSION ; echo "6.19" ; } | sort -V -c 2>/dev/null
+elif { echo $VERSION2 ; echo "6.0.19" ; } | sort -V -c 2>/dev/null
 then
   PATCHFILE="patch6.0"
 else
joyfulcat commented 8 months ago

Have you solved this?