diff options
author | XZS | 2015-08-06 14:44:14 +0200 |
---|---|---|
committer | XZS | 2015-08-06 14:44:14 +0200 |
commit | a30641e23a71a9bba2a2824e94c617b515f05e3b (patch) | |
tree | dc314a85fbb50f1b94bc7e6a347666cfaeb1e3a9 | |
parent | a2e064fc33a0cd3375e7beda2e9cd7decdefab31 (diff) | |
download | aur-a30641e23a71a9bba2a2824e94c617b515f05e3b.tar.gz |
sort package functions
-rw-r--r-- | PKGBUILD | 32 |
1 files changed, 16 insertions, 16 deletions
@@ -13,22 +13,6 @@ license=(unknown) source=("${pkgname}.zip::http://sourceforge.net/projects/mt-miscellaneous/files/gnome-extensions/3.16/${_extname}.v6.shell-extension.zip/download") md5sums=('e7ea5800d8408ea33496cdac01a058f6') -depends[gnomeshell]=gnome-shell - -package_20_version() { - local compatibles=($(\ - find -path ./pkg -type d -prune -o \ - -name metadata.json -exec grep -Pzo '(?s)(?<="shell-version": \[)[^\[\]]*(?=\])' '{}' \; | \ - tr '\n," ' '\n' | sed 's/3\.//g;/^$/d' | sort -n -t. -k 1,1)) - depends+=("gnome-shell>=3.${compatibles[0]}") - local max="${compatibles[-1]}" - if [ "3.$max" != $( - gnome-shell --version | grep -Po '(?<=GNOME Shell 3\.)[[:digit:]]+' - ) ]; then - depends+=("gnome-shell<3.$((${max%%.*} + 1))") - fi - unset depends[gnomeshell] -} package() { for function in $(declare -F | grep -Po 'package_[[:digit:]]+[[:alpha:]_]*$') do @@ -55,3 +39,19 @@ package_10_schemas() { msg2 'Installing schemas...' find -name '*.xml' -exec install -Dm644 -t "$pkgdir/usr/share/glib-2.0/schemas" '{}' + } +depends[125]=gnome-shell + +package_20_version() { + local compatibles=($(\ + find -path ./pkg -type d -prune -o \ + -name metadata.json -exec grep -Pzo '(?s)(?<="shell-version": \[)[^\[\]]*(?=\])' '{}' \; | \ + tr '\n," ' '\n' | sed 's/3\.//g;/^$/d' | sort -n -t. -k 1,1)) + depends+=("gnome-shell>=3.${compatibles[0]}") + local max="${compatibles[-1]}" + if [ "3.$max" != $( + gnome-shell --version | grep -Po '(?<=GNOME Shell 3\.)[[:digit:]]+' + ) ]; then + depends+=("gnome-shell<3.$((${max%%.*} + 1))") + fi + unset depends[125] +} |