aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott B2021-11-29 03:38:27 -0800
committerScott B2021-12-01 02:27:10 -0800
commitd1984d664c03fa1b9e1335113f85e244de82670c (patch)
tree32484177db013f7eb4f85d868784acb939270d49
parentefdac9b87edee9502d5d541100574ecb3e399ca0 (diff)
downloadaur-d1984d664c03fa1b9e1335113f85e244de82670c.tar.gz
pkgbuild: don't fork for easy substrings
-rw-r--r--PKGBUILD7
1 files changed, 3 insertions, 4 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 9ee4304d03f7..67247b151208 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -109,10 +109,9 @@ if [ "$_compiler" = "clang" ]; then
_LLVM=1
fi
options=('!strip')
-_major=$(echo $xanmod | cut -d'.' -f1,2)
-_patchver=$(echo $pkgver | cut -d'.' -f3)
-_branch="$(echo $xanmod | cut -d'.' -f1).x"
-_localversion=$(echo $pkgver | cut -d'.' -f4)
+_major=${xanmod%\.*\-*} # 5.15
+_branch=${xanmod%%\.*\-*}.x # 5.x
+_localversion=${pkgver##*\.} # xanmod1
source=("https://cdn.kernel.org/pub/linux/kernel/v${_branch}/linux-${_major}.tar."{xz,sign}
"https://github.com/xanmod/linux/releases/download/${xanmod}/patch-${xanmod}.xz"