Last active
November 19, 2023 06:23
-
-
Save metebalci/e97f2f1119c0bbd71f5dd8baa714fd36 to your computer and use it in GitHub Desktop.
pre-commit hook to check licenses
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
for fname in *.c *.h *.ld *.py Makefile README.md | |
do | |
grep -L "SPDX-License-Identifier: Apache-2.0" $fname | |
if [ $? -ne 0 ] | |
then | |
echo "LICENSE in $fname is not NOK. Run 'make fixlicenses'." | |
exit 1 | |
fi | |
done | |
echo "LICENSE headers OK." | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment