summaryrefslogtreecommitdiff
path: root/src/aur
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-06-05 19:33:49 -0600
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-06-05 19:44:27 -0600
commita0a11867a85d5694a24de22751d8db7f59c1f347 (patch)
treeba35b209962b4e568d4d6e0fd60af892486f80e6 /src/aur
parent86cfc9b4880b32c084b64b59bcff97d3110c4713 (diff)
pull code from `aur` into new prog `pkgbuild-check-licenses`, enhance
Diffstat (limited to 'src/aur')
-rwxr-xr-xsrc/aur34
1 files changed, 9 insertions, 25 deletions
diff --git a/src/aur b/src/aur
index 3c7f2cc..6e7cd99 100755
--- a/src/aur
+++ b/src/aur
@@ -96,34 +96,18 @@ main() {
################################################################
- msg2 "Checking license..."
- local free=0
- for _license in "${license[@]}"; do
- if [[ ! -e "/usr/share/licenses/common/$_license" ]]; then
- case "${_license#custom:}" in
- WTFPL)
- # accept as common, I think it should be in the licenses package.
- :;;
- BSD1|BSD2|BSD3|MIT|X11)
- # accept these as common; they can't be included in the licenses package because some of the text must be customized
- :;;
- BSD4)
- warning "The 4-clause BSD license is free but has practical problems.";;
- BSD)
- warning "License \"BSD\" is ambiguous, please use one of \"BSD{1..4}\" to specify the number of clauses."
- free=1
- ;;
- *)
- warning "License \"$_license\" is not a common license"
- free=1
- ;;
+ local s=0
+ pkgbuild-check-licenses || s=$?
+ for i in 1 2 4; do
+ if [[ $s == $(($s & $i)) ]]; then
+ case $i in
+ 1) warning "pkgbuild-check-licenses encountered an error";;
+ 2) warning "This PKGBUILD has an uncommon license";;
+ 4) warning "This PKGBUILD has a known nonfree license";;
esac
fi
done
-
- if [[ $free -eq 1 ]]; then
- plain "Please check that the license is included in the package and *specially* that it respects your freedom."
- fi
+ unset s
################################################################