2 # SPDX-License-Identifier: BSD-3-Clause
3 # Copyright 2020 Microsoft Corporation
5 # Produce a list of files with incorrect license tags
13 echo "usage: $(basename $0) [-q] [-v]"
19 echo "Files without SPDX License"
20 echo "--------------------------"
22 git grep -L SPDX-License-Identifier -- \
23 ':^.git*' ':^.ci/*' ':^.travis.yml' \
24 ':^README' ':^MAINTAINERS' ':^VERSION' ':^ABI_VERSION' \
25 ':^*/Kbuild' ':^*/README' \
26 ':^license/' ':^config/' ':^buildtools/' \
27 ':^*.cocci' ':^*.abignore' \
28 ':^*.map' ':^*.ini' ':^*.data' ':^*.json' ':^*.cfg' ':^*.txt' \
32 errors=$(wc -l < $tmpfile)
33 $quiet || cat $tmpfile
39 echo "Files with redundant license text"
40 echo "---------------------------------"
43 git grep -l Redistribution -- \
44 ':^license/' ':^/devtools/check-spdx-tag.sh' > $tmpfile
46 warnings=$(wc -l <$tmpfile)
47 $quiet || cat $tmpfile
50 while getopts qvh ARG ; do
54 h ) print_usage ; exit 0 ;;
55 ? ) print_usage ; exit 1 ;;
58 shift $(($OPTIND - 1))
60 tmpfile=$(mktemp -t dpdk.checkspdx.XXXXXX)
61 trap 'rm -f -- "$tmpfile"' INT TERM HUP EXIT
69 echo "total: $errors errors, $warnings warnings"