From 6b5838f72fe535afb542e888d7d2d2da3571bea2 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sat, 24 Feb 2024 17:47:39 +0200 Subject: initial commit + Now to do the actual hard parts, heh --- scripts/license | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 scripts/license (limited to 'scripts/license') 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 -- cgit v1.3