From 187c8afb95120b01bafa15a137aa09f4c10f572a Mon Sep 17 00:00:00 2001 From: Piotr Wójcik Date: Fri, 26 Jul 2019 21:36:41 +0200 Subject: xlint: read license list from LICENSE_LIST variable Closes: #139 [via git-merge-pr] --- xlint | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'xlint') diff --git a/xlint b/xlint index 7ad0658..8d4775f 100755 --- a/xlint +++ b/xlint @@ -243,13 +243,14 @@ for template; do done fi - if [ -f /usr/share/spdx/license.lst ]; then + : ${LICENSE_LIST:=/usr/share/spdx/license.lst} + if [ -f "${LICENSE_LIST}" ]; then sed -n 's/license="\(.*\)"/\1/p' "$template" | tr , "\n" | while read -r l; do if echo "$l" | grep -q 'custom:'; then continue fi - if ! grep -q "^${l}$" /usr/share/spdx/license.lst; then + if ! grep -q "^${l}$" "${LICENSE_LIST}"; then scan "license=.*$l" "license '$l' is not SPDX" fi done -- cgit 1.4.1