Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/libmakepkg/lint_package.sh.in11
-rw-r--r--scripts/libmakepkg/lint_package/build_references.sh.in2
-rw-r--r--scripts/libmakepkg/lint_package/missing_backup.sh.in2
3 files changed, 13 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
}
diff --git a/scripts/libmakepkg/lint_package/build_references.sh.in b/scripts/libmakepkg/lint_package/build_references.sh.in
index f6de2900..6b03e484 100644
--- a/scripts/libmakepkg/lint_package/build_references.sh.in
+++ b/scripts/libmakepkg/lint_package/build_references.sh.in
@@ -26,6 +26,8 @@ LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
source "$LIBRARY/util/message.sh"
+lint_package_functions+=('warn_build_references')
+
warn_build_references() {
if find "${pkgdir}" -type f -print0 | xargs -0 grep -q -I "${srcdir}" ; then
warning "$(gettext "Package contains reference to %s")" "\$srcdir"
diff --git a/scripts/libmakepkg/lint_package/missing_backup.sh.in b/scripts/libmakepkg/lint_package/missing_backup.sh.in
index d1008749..64d5a64a 100644
--- a/scripts/libmakepkg/lint_package/missing_backup.sh.in
+++ b/scripts/libmakepkg/lint_package/missing_backup.sh.in
@@ -26,6 +26,8 @@ LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
source "$LIBRARY/util/message.sh"
+lint_package_functions+=('warn_missing_backup')
+
warn_missing_backup() {
local file
for file in "${backup[@]}"; do