Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script to to remove year in license headers #1227

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions scripts/license-update.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash
################################################################################
################################################################################
##
## DESCRIPTION
## This script will remove the year in all license headers
##
################################################################################
################################################################################

DIRECTORIES="../bin ../chain-extensions ../pallets ../precompiles ../primitives ../rpc-tests ../runtime ../tests ../third-party ../vendor"

# Find all source files with the old year in the copyright notice in the parent directory and its subdirectories
FILES=$(find $DIRECTORIES -type f -exec grep -l -F -e "Copyright (C) 2019-2023" {} +)

# Iterate over each file and update the year
for FILE in $FILES; do
sed -i '' -e "s/Copyright (C) 2019-2023/Copyright (C)/g" "$FILE"
echo "Updated $FILE"
done
Loading