summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDet2018-08-18 20:09:56 +0300
committerDet2018-08-18 20:09:56 +0300
commitd6863a976e42a6eaf89dbce6b0d264fbb0b47db6 (patch)
tree6bc8f8c8260c2f2305248618ab3a7d20c40cb995
parent57907e0f744a1f1baa0cb85d7c4282a3e65b724c (diff)
downloadaur-d6863a976e42a6eaf89dbce6b0d264fbb0b47db6.tar.gz
Cosmetics
-rw-r--r--PKGBUILD18
1 files changed, 9 insertions, 9 deletions
diff --git a/PKGBUILD b/PKGBUILD
index e8e821b77d5b..e8b4b4f932de 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -70,20 +70,20 @@ prepare() {
cd $_pkg
bsdtar -xf nvidia-persistenced-init.tar.bz2
- # Kernel version (e.g. 4.15.0-1-ARCH)
+ # Kernel version (e.g. 4.18.3-arch1-1-ARCH)
_kernel=$(cat /usr/lib/modules/$_extramodules/version)
- # 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+")
# Compare versions
- if (( $(vercmp "$_kernel" "$_patch") >= 0 )); then
- msg2 "Applying $_p..."
- patch -p1 -i "$srcdir"/$_p
+ if (( $(vercmp "$_kernel" "$_patchver") >= 0 )); then
+ msg2 "Applying $_patch..."
+ patch -p1 -i "$srcdir"/$_patch
else
- msg2 "Skipping $_p..." # List these, instead of ignoring silently
+ msg2 "Skipping $_patch..." # List these, instead of ignoring silently
fi
done
}