Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts/libmakepkg/lint_package.sh.in
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2015-02-01 22:32:51 +1000
committerAllan McRae <allan@archlinux.org>2015-02-12 14:00:57 +1000
commitadc6ca1f2c08bb01a29f5247bfa5ee3bd30ee727 (patch)
tree87348647a322bbf8bcd2e696be8eed4dc4a57689 /scripts/libmakepkg/lint_package.sh.in
parent00da25a5ea3413e128c455fd711cf46692df6159 (diff)
libmakepkg: make package checking functions extendable
To add a new package check, drop a file in libmakepkg/lint and add the function to the "lint_functions" array. Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'scripts/libmakepkg/lint_package.sh.in')
-rw-r--r--scripts/libmakepkg/lint_package.sh.in11
1 files changed, 9 insertions, 2 deletions
diff --git a/scripts/libmakepkg/lint_package.sh.in b/scripts/libmakepkg/lint_package.sh.in
index c2d3e322..e5e23bbd 100644
--- a/scripts/libmakepkg/lint_package.sh.in
+++ b/scripts/libmakepkg/lint_package.sh.in
@@ -25,14 +25,21 @@ LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
source "$LIBRARY/util/message.sh"
+
+declare -a lint_package_functions
+
for lib in "$LIBRARY/lint_package/"*.sh; do
source "$lib"
done
+readonly -a lint_package_functions
+
+
lint_package() {
cd_safe "$pkgdir"
msg "$(gettext "Checking for packaging issue...")"
- warn_missing_backup
- warn_build_references
+ for func in ${lint_package_functions[@]}; do
+ $func
+ done
}