diff options
author | XZS | 2022-09-07 21:44:13 +0200 |
---|---|---|
committer | XZS | 2022-09-08 17:59:48 +0200 |
commit | 239b8524fd9d60503c2839ffbcacfa24e6c3e3cc (patch) | |
tree | 9bc54eff7eca365d621d0f4024eeb3a5a49e4e46 | |
parent | ca0a095011b959a2fe76a5e04c6708a6bd9c03a3 (diff) | |
download | aur-239b8524fd9d60503c2839ffbcacfa24e6c3e3cc.tar.gz |
adjust to new version numbering scheme
Since GNOME (3.)40, the former first component of the version number is
dropped. [1] Functions that input or output version numbers are now
compatible with both schemes, making it possible to even manage
extensions that declare compatible versions ranging from before to after
shell version (3.)40.
[1]: https://discourse.gnome.org/t/new-gnome-versioning-scheme/4235
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 11 |
2 files changed, 7 insertions, 6 deletions
@@ -2,7 +2,7 @@ pkgbase = gnome-shell-extension-coverflow-alt-tab-git pkgdesc = Replacement of Alt-Tab, iterates through windows in a cover-flow manner url = https://github.com/dmo60/CoverflowAltTab pkgver = 1.10 - pkgrel = 2 + pkgrel = 3 install = gschemas.install arch = any license = GPL @@ -6,7 +6,7 @@ pkgname=gnome-shell-extension-coverflow-alt-tab-git pkgver=1.10 -pkgrel=2 +pkgrel=3 pkgdesc="Replacement of Alt-Tab, iterates through windows in a cover-flow manner" arch=('any') url="https://github.com/dmo60/CoverflowAltTab" @@ -67,8 +67,9 @@ package_10_schemas() { } depends[125]=gnome-shell +readonly prefixes=(3. 1:3. 1:) prefix() { - [ "$1" -le 30 ] || echo 1: + echo "${prefixes[(( ("$1" > 30) + ("$1" >= 40) ))]}" } package_20_version() { @@ -78,13 +79,13 @@ package_20_version() { tr -d '\n' | grep -Po '(?<="shell-version": \[)[^\[\]]*(?=\])' | \ tr '\n," ' '\n' | sed 's/3\.//g;/^$/d' | sort -n -t. -k 1,1)) local min="${compatibles[0]}" - depends+=("gnome-shell>=$(prefix "${min%%.*}")3.$min") + depends+=("gnome-shell>=$(prefix "${min%%.*}")$min") if [ "${compatibles[-1]}" != $( LD_PRELOAD= gnome-shell --version | \ - grep -Po '(?<=GNOME Shell 3\.)[[:digit:]]+' + sed -n 's/^GNOME Shell \(3\.\)\?\([[:digit:]]\+\).*$/\2/p' ) ]; then let max=${compatibles[-1]%%.*}+1 - depends+=("gnome-shell<$(prefix "$max")3.$max") + depends+=("gnome-shell<$(prefix "$max")$max") fi unset depends[125] } |