2023-10-20 11:40:43 -04:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
|
|
# Used as a stopgap for copywrite bot in MPL-licensed subdirs, detects BUSL licensed
|
2025-01-08 15:39:28 -05:00
|
|
|
# headers in only files intended for public users, and deletes them,
|
|
|
|
|
# then runs the copywrite bot to utilize local subdir config
|
2023-10-20 11:40:43 -04:00
|
|
|
# to inject correct headers.
|
|
|
|
|
|
2025-01-08 16:21:19 -05:00
|
|
|
find . -type f -name '*.go' -not -name '*_ent.go' -not -name '*_ent_test.go' | while read line; do
|
2023-10-20 11:40:43 -04:00
|
|
|
if grep "SPDX-License-Identifier: BUSL-1.1" $line; then
|
2024-01-02 16:22:15 -05:00
|
|
|
sed -i '/SPDX-License-Identifier: BUSL-1.1/d' $line
|
2025-10-21 17:20:20 -04:00
|
|
|
sed -i '/Copyright IBM Corp. 2016, 2025/d' $line
|
2023-10-20 11:40:43 -04:00
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
copywrite headers --plan
|