summaryrefslogtreecommitdiff
path: root/src/chroot-tools/hooks-check.sh
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-10-26 01:35:45 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-10-26 17:18:11 -0400
commit23faa9361d79d1d88754a1e1e5aa9f040b34545c (patch)
tree2a0dcd569de702c6f697c5e5536c5ddd07c8146e /src/chroot-tools/hooks-check.sh
parent99933725329dc760f5cc704b3fd20f033dafdd14 (diff)
Merge pkgbuild-check-{nonfree,licenses}, add a summarize tool for it.
This should fix a number of bugs in those two scripts, and the summarize script simplifies aur and libremakepkg:hooks-check.sh
Diffstat (limited to 'src/chroot-tools/hooks-check.sh')
-rw-r--r--src/chroot-tools/hooks-check.sh25
1 files changed, 3 insertions, 22 deletions
diff --git a/src/chroot-tools/hooks-check.sh b/src/chroot-tools/hooks-check.sh
index e8120b8..2702f95 100644
--- a/src/chroot-tools/hooks-check.sh
+++ b/src/chroot-tools/hooks-check.sh
@@ -1,30 +1,11 @@
#!/usr/bin/env bash
set -euE
-hook_check_pkgbuild+=("check_pkgbuild_dependencies")
-check_pkgbuild_dependencies() {
+hook_check_pkgbuild+=("check_pkgbuild_nonfree")
+check_pkgbuild_nonfree() {
local s=0
sudo -EH -u "$LIBREUSER" pkgbuild-check-nonfree -f || s=$?
- case $s in
- 0) :;;
- 15) error "This PKGBUILD links to known unfree packages"; return 1;;
- *) warning "pkgbuild-check-nonfree failed to run";;
- esac
-}
-
-hook_check_pkgbuild+=("check_pkgbuild_license")
-check_pkgbuild_license() {
- local s=0
- sudo -EH -u "$LIBREUSER" pkgbuild-check-licenses -f || s=$?
- for i in 1 2 4; do
- if [[ $i -eq $(($s & $i)) ]]; then
- case $i in
- 1) warning "pkgbuild-check-licenses encountered an error";;
- 2) warning "This PKGBUILD has an uncommon license";;
- 4) error "This PKGBUILD has a known nonfree license"; ret=1;;
- esac
- fi
- done
+ pkgbuild-summarize-nonfree $s
}
#hook_check_pkgbuild+=("check_pkgbuild_namcap")