summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--PKGBUILD7
1 files changed, 6 insertions, 1 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 31cbbd85921e..c0bc97b50288 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -43,7 +43,12 @@ sha256sums=('53543a561fce67714fec9f2a6bf408c5cc1d061c7dc9d1459458275e8ccbfa79'
# Heuristic to determine version of installed kernel
# You can modify this if the heuristic fails
-_kernelver=$(ls -dt /usr/lib/modules/* | head -n1 | cut -d/ -f5)
+if uname -r | grep -q lts; then
+ # if you are currently running an lts kernel, only consider lts versions
+ _kernelver=$(ls -dt /usr/lib/modules/*lts* | head -n1 | cut -d/ -f5)
+else
+ _kernelver=$(ls -dt /usr/lib/modules/* | head -n1 | cut -d/ -f5)
+fi
_extramodules="/usr/lib/modules/${_kernelver}/extramodules"
prepare() {