diff --git a/scripts/gocopyright b/scripts/gocopyright new file mode 100755 index 0000000..bd4c47d --- /dev/null +++ b/scripts/gocopyright @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +addcopyright() { + file=$(tempfile) + cat <(echo "// Copyright 2022 Robert S. Muhlestein +// SPDX-License-Identifier: Apache-2.0 + ") "$1" >> "$file" + mv "$file" "$1" +} + +for f in "$@"; do addcopyright "$f"; done