From d96b8c7d12fc61ec609d6138627b9d6d18139a9a Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sat, 28 Oct 2023 00:00:21 +0300 Subject: move to monorepo + Will probably have to make some changes to dir layout to make things make more sense --- triscv/scripts/license | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 triscv/scripts/license (limited to 'triscv/scripts/license') diff --git a/triscv/scripts/license b/triscv/scripts/license new file mode 100755 index 0000000..53bd5da --- /dev/null +++ b/triscv/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