aboutsummaryrefslogtreecommitdiff
path: root/scripts/license
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2023-03-07 02:18:26 +0200
committerKimplul <kimi.h.kuparinen@gmail.com>2023-03-07 02:18:26 +0200
commitae5fee63f160643a397d18e9e0658275606bc4d4 (patch)
treef68af302374f9ae3c9dbb28dab5547036252d559 /scripts/license
downloadek-ae5fee63f160643a397d18e9e0658275606bc4d4.tar.gz
ek-ae5fee63f160643a397d18e9e0658275606bc4d4.zip
initial commit
Diffstat (limited to 'scripts/license')
-rwxr-xr-xscripts/license11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/license b/scripts/license
new file mode 100755
index 0000000..2a2de9b
--- /dev/null
+++ b/scripts/license
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+SPDX="/* SPDX-License-Identifier: GPL-3.0-or-later */"
+
+for f in "$@"
+do
+ if [ "$(head -1 "$f")" != "${SPDX}" ]
+ then
+ sed -i "1i${SPDX}\n" "$f"
+ fi
+done