aboutsummaryrefslogtreecommitdiff
path: root/scripts/license
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2024-10-18 22:35:27 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2024-10-23 18:25:23 +0300
commit7c5f098511b8f612a17f4ccdd8a4924c325d37e1 (patch)
tree4a97d802557bbffcadfcfd776c8e4afdb31d96aa /scripts/license
parent18262dcbecd97591dd15ee9274a81abb8c2ba1c4 (diff)
downloadlyn-7c5f098511b8f612a17f4ccdd8a4924c325d37e1.tar.gz
lyn-7c5f098511b8f612a17f4ccdd8a4924c325d37e1.zip
initial parser+lexer
+ AST might still change, also not a *huge* fan of having to reverse all arrays but I guess it's unlikely to be a significant bottleneck
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