Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts/libmakepkg/util/pkgbuild.sh.in
diff options
context:
space:
mode:
authorAshley Whetter <ashley@awhetter.co.uk>2016-05-08 17:28:28 +0100
committerAllan McRae <allan@archlinux.org>2016-05-18 15:45:56 +1000
commit4f114f38178aeaffcc571aa42e2f930ca916f79d (patch)
tree4952ff8c80728d2dba04bfe05b64907110a7ccc2 /scripts/libmakepkg/util/pkgbuild.sh.in
parent892a1076c00a2b0097145c35f5d8ef590216dac0 (diff)
libmakepkg: extract functions for integrity checking
Signed-off-by: Ashley Whetter <ashley@awhetter.co.uk> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'scripts/libmakepkg/util/pkgbuild.sh.in')
-rw-r--r--scripts/libmakepkg/util/pkgbuild.sh.in20
1 files changed, 19 insertions, 1 deletions
diff --git a/scripts/libmakepkg/util/pkgbuild.sh.in b/scripts/libmakepkg/util/pkgbuild.sh.in
index 51d87329..1a4567dc 100644
--- a/scripts/libmakepkg/util/pkgbuild.sh.in
+++ b/scripts/libmakepkg/util/pkgbuild.sh.in
@@ -2,7 +2,7 @@
#
# pkgbuild.sh - functions to extract information from PKGBUILD files
#
-# Copyright (c) 2014-2016 Pacman Development Team <pacman-dev@archlinux.org>
+# Copyright (c) 2009-2016 Pacman Development Team <pacman-dev@archlinux.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -189,3 +189,21 @@ get_all_sources_for_arch() {
array_build "$1" "aggregate"
}
+
+get_integlist() {
+ local integ
+ local integlist=()
+
+ for integ in "${known_hash_algos[@]}"; do
+ local sumname="${integ}sums[@]"
+ if [[ -n ${!sumname} ]]; then
+ integlist+=("$integ")
+ fi
+ done
+
+ if (( ${#integlist[@]} > 0 )); then
+ printf "%s\n" "${integlist[@]}"
+ else
+ printf "%s\n" "${INTEGRITY_CHECK[@]}"
+ fi
+}