summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorDet2018-08-18 20:10:13 +0300
committerDet2018-08-18 20:10:13 +0300
commite2b5319280854b448b42916a034055093e1c6e37 (patch)
tree4308c574cc52b58a588b66af4a3016c8acfb2e76 /PKGBUILD
parent8e64983e71c128a75ed16df61f1c5cbfeadeeff4 (diff)
downloadaur-e2b5319280854b448b42916a034055093e1c6e37.tar.gz
Cosmetics
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD18
1 files changed, 9 insertions, 9 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 1b98eabfc8a6..f5e5ca8efc1f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -68,25 +68,25 @@ prepare() {
cd $_pkg
bsdtar -xf nvidia-persistenced-init.tar.bz2
- # Loop kernels (4.15.0-1-ARCH, 4.14.5-1-ck, ...)
+ # Loop kernels (e.g. 4.18.3-arch1-1-ARCH)
for _kernel in $(cat /usr/lib/modules/extramodules-*/version); do
# Use separate source directories
cp -r kernel kernel-$_kernel
- # Loop patches (linux-4.15.patch, lol.patch, ...)
- for _p in $(printf -- '%s\n' ${source[@]} | grep .patch); do # https://stackoverflow.com/a/21058239/1821548
- # Patch version (4.15, "", ...)
- _patch=$(echo $_p | grep -Po "\d+\.\d+")
+ # Loop patches (e.g. linux-4.18.patch, lol.patch, ...)
+ for _patch in $(printf -- '%s\n' ${source[@]} | grep .patch); do # https://stackoverflow.com/a/21058239/1821548
+ # Get patch version (if any) from filename
+ _patchver=$(echo $_patch | grep -Po "\d+\.\d+")
# Cd in place
cd kernel-$_kernel
# Compare versions
- if (( $(vercmp "$_kernel" "$_patch") >= 0 )); then
- msg2 "Applying $_p for $_kernel..."
- patch -p2 -i "$srcdir"/$_p
+ if (( $(vercmp "$_kernel" "$_patchver") >= 0 )); then
+ msg2 "Applying $_patch for $_kernel..."
+ patch -p2 -i "$srcdir"/$_patch
else
- msg2 "Skipping $_p..." # List these, instead of ignoring silently
+ msg2 "Skipping $_patch..." # List these, instead of ignoring silently
fi
# Return