Mercurial > vanilla
comparison Scripts/lint-licenses.sh @ 1107:7791d3dbfecf
vanilla: consolidate licenses and many options
author | David Demelier <markand@malikania.fr> |
---|---|
date | Wed, 18 Sep 2019 21:01:00 +0200 |
parents | |
children | 297b5eef115e |
comparison
equal
deleted
inserted
replaced
1106:477457540aa0 | 1107:7791d3dbfecf |
---|---|
1 #!/bin/busybox sh | |
2 # | |
3 # lint-licenses.sh -- check if packages use undefined licenses | |
4 # | |
5 # Copyright (c) 2019 David Demelier <markand@malikania.fr> | |
6 # | |
7 # Permission to use, copy, modify, and/or distribute this software for any | |
8 # purpose with or without fee is hereby granted, provided that the above | |
9 # copyright notice and this permission notice appear in all copies. | |
10 # | |
11 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
12 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
13 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
14 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
15 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | |
16 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | |
17 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
18 # | |
19 | |
20 . $(dirname $0)/scripts.subr | |
21 | |
22 check() | |
23 { | |
24 vnl_open_build $1 | |
25 | |
26 if [ -z "$PKGNAME" ]; then | |
27 exit 1 | |
28 fi | |
29 | |
30 printf "${BOLD}=> checking licenses for $PKGNAME${RESET}\n" | |
31 | |
32 for l in $PKGLICENSE; do | |
33 if ! grep -qx -- "- $l" $TOP/Docs/licenses.md; then | |
34 echo "note: license $l is unknown or custom" 1>&2 | |
35 fi | |
36 done | |
37 } | |
38 | |
39 check $1 |