summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorXZS2015-08-06 14:44:08 +0200
committerXZS2015-08-06 14:44:08 +0200
commite1025e44c509faa306875319c794fa0efcfc603b (patch)
treec0d56230e3d2e6315f859d6ca4882d6dfaf3bbbe /PKGBUILD
parentb8e2df794810203c5601065f3c972298ff1457e2 (diff)
downloadaur-e1025e44c509faa306875319c794fa0efcfc603b.tar.gz
sort package functions
Sorting the template inclusion by the order of their package functions being called showed a bug swallowing dependencies. Misusing the indexed array of dependencies placed the element assigned by a key in first position always overwriting an already present element. Using a symbolic number makes it work fine as long as it is ensured that this number is greater than the number of dependencies, which should be fairly probable with 125.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD32
1 files changed, 16 insertions, 16 deletions
diff --git a/PKGBUILD b/PKGBUILD
index d4c6e9ccf823..2ee4db73c519 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -23,22 +23,6 @@ pkgver() {
[ ${PIPESTATUS[0]} -ne 0 ] && \
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
-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
@@ -56,3 +40,19 @@ package_02_install() {
msg2 'Installing extension code...'
find -maxdepth 1 \( -iname '*.js*' -or -iname '*.css' -or -iname '*.ui' \) -exec install -Dm644 -t "$destdir" '{}' +
}
+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]
+}