aboutsummaryrefslogtreecommitdiff
path: root/scripts/license
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2023-05-01 22:02:49 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2023-05-01 22:02:49 +0300
commit05d4244f68e35c1bef6488292bf9730df3636fd9 (patch)
tree1a5d0ec138060020cf16bd472691e64b260ccbe0 /scripts/license
parent2093765807e60a28ef4e0691474ea5b20346bf00 (diff)
downloadkmi-05d4244f68e35c1bef6488292bf9730df3636fd9.tar.gz
kmi-05d4244f68e35c1bef6488292bf9730df3636fd9.zip
update license stuff
Diffstat (limited to 'scripts/license')
-rwxr-xr-xscripts/license16
1 files changed, 16 insertions, 0 deletions
diff --git a/scripts/license b/scripts/license
new file mode 100755
index 0000000..53bd5da
--- /dev/null
+++ b/scripts/license
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+SPDX="/* SPDX-License-Identifier: copyleft-next-0.3.1 */"
+
+for f in "$@"
+do
+ if [ "$(head -1 "$f")" != "${SPDX}" ]
+ then
+ sed -i "1i${SPDX}\n" "$f"
+ fi
+
+ if ! grep 'Copyright' "$f" > /dev/null
+ then
+ echo "Missing copyright info in $f"
+ fi
+done