summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorbartus2021-01-06 01:10:25 +0100
committerbartus2021-01-06 01:10:25 +0100
commit0507d6b2036fb75db4e53794e62cb43a5ced0324 (patch)
tree1b6d39e9af1cb3a1a7fc43143361dd7ca22b82ff /PKGBUILD
parent840d7ed690e57ac19d22d19e5c4f1c549ed8d0e0 (diff)
downloadaur-0507d6b2036fb75db4e53794e62cb43a5ced0324.tar.gz
Refactor pkgver()
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD10
1 files changed, 7 insertions, 3 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 257bffb722c..e779947b53b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -12,7 +12,7 @@ _sufix=${_branch}
_fragment="#branch=${_branch}"
pkgname=blender-${_sufix}-git
-pkgver=2.79b.r70678.g233ad61cb8d
+pkgver=2.79.r70678.g233ad61cb8d
_blenver=${pkgver:0:4}
pkgrel=1
pkgdesc="Development version of Blenders ${_branch} branch"
@@ -69,8 +69,12 @@ sha256sums=('SKIP'
'e959c2ae13baa35e9ee6d9ff8f30fea55a60ccd59a0b8d047df134aee4b5424e')
pkgver() {
- cd "$srcdir/blender"
- printf "%sb.r%s.g%s" "$(grep -Po "BLENDER_VERSION *\K[0-9]{3}" source/blender/blenkernel/BKE_blender_version.h|sed 's/./&./1')" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ blender_version=$(grep -Po "BLENDER_VERSION\s+\K[0-9]{3}" "$srcdir"/blender/source/blender/blenkernel/BKE_blender_version.h)
+ printf "%d.%d.r%s.g%s" \
+ $((blender_version/100)) \
+ $((blender_version%100)) \
+ "$(git -C "$srcdir/blender" rev-list --count HEAD)" \
+ "$(git -C "$srcdir/blender" rev-parse --short HEAD)"
}
prepare() {