summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-06-05 19:32:34 -0600
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-06-05 19:44:27 -0600
commit35e9dd7eb25ff4ec12f0a59c586f0a01c9db5dcd (patch)
tree7797459cf0a68d90a05d2b4fbcaf2cf969df34c6 /src
parent1b316373568d01ea366ee3da280085b3d8d5078b (diff)
aur: detect common licenses not in /usr/share/license/common
Diffstat (limited to 'src')
-rwxr-xr-xsrc/aur22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/aur b/src/aur
index 5a29a34..739681e 100755
--- a/src/aur
+++ b/src/aur
@@ -99,9 +99,25 @@ main() {
msg2 "Checking license..."
local free=0
for _license in "${license[@]}"; do
- if [[ ! -d "/usr/share/licenses/common/$_license" ]]; then
- warning "License $_license is not a common license"
- free=1
+ 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
+ ;;
+ esac
fi
done