Skip to content

Commit

Permalink
improve license check script (#1443)
Browse files Browse the repository at this point in the history
  • Loading branch information
LesnyRumcajs authored Mar 1, 2022
1 parent 7589b55 commit 6f49203
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/add_license.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
PAT_APA="^// Copyright 2019-2022 ChainSafe Systems// SPDX-License-Identifier: Apache-2.0, MIT$"

ret=0
for file in $(find . -type f -not -path "./target/*" -not -path "./blockchain/beacon/src/drand_api/*" -not -path "./ipld/graphsync/src/message/proto/message.rs" | grep -E '\.(rs)$'); do
for file in $(git grep --cached -Il '' -- '*.rs' ':!*ipld/graphsync/src/message/proto/message.rs'); do
header=$(head -2 "$file" | tr -d '\n')
if ! echo "$header" | grep -q "$PAT_APA"; then
echo "$file was missing header"
Expand Down

0 comments on commit 6f49203

Please sign in to comment.