all: update tools that manage copyright headers
Update all code generation tools, and those that check for license headers to use the new standard header. Also update copyright statement in LICENSE file. Fixes #6865 Signed-off-by: Will Norris <will@tailscale.com>
This commit is contained in:
@ -9,17 +9,14 @@
|
||||
check_file() {
|
||||
got=$1
|
||||
|
||||
for year in `seq 2019 2023`; do
|
||||
want=$(cat <<EOF
|
||||
// Copyright (c) $year Tailscale Inc & AUTHORS All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
want=$(cat <<EOF
|
||||
// Copyright (c) Tailscale Inc & AUTHORS
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
EOF
|
||||
)
|
||||
if [ "$got" = "$want" ]; then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
)
|
||||
if [ "$got" = "$want" ]; then
|
||||
return 0
|
||||
fi
|
||||
return 1
|
||||
}
|
||||
|
||||
@ -50,7 +47,7 @@ for file in $(find $1 -name '*.go' -not -path '*/.git/*'); do
|
||||
# Generated syscall wrappers
|
||||
;;
|
||||
*)
|
||||
header="$(head -3 $file)"
|
||||
header="$(head -2 $file)"
|
||||
if ! check_file "$header"; then
|
||||
fail=1
|
||||
echo "${file#$1/} doesn't have the right copyright header:"
|
||||
|
Reference in New Issue
Block a user