Skip to content

Commit

Permalink
Update copyright githook (ROCm#1539)
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Ulmer authored Jun 14, 2022
1 parent c7d39b6 commit 4b41b46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .githooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ for file in $files; do
echo "Processing copyright dates in $file"
if [[ -e $file ]]; then
/usr/bin/perl -pi -e 'INIT { exit 1 if !-f $ARGV[0] || -B $ARGV[0]; $year = (localtime)[5] + 1900 }
s/^([*\/#[:space:]]*)Copyright\s+(?:\(C\)\s*)?(\d+)(?:\s*-\s*\d+)?/qq($1Copyright $2@{[$year != $2 ? "-$year" : ""]})/ie
s/^([*\/#\/"*[:space:]]*)Copyright\s+(?:\(C\)\s*)?(\d+)(?:\s*-\s*\d+)?\s(Advanced\s*Micro\s*Devices)/qq($1Copyright (C) $2@{[$year != $2 ? "-$year" : ""]} $3)/ie
if $. < 10' "$file" && git add -u "$file"
fi
done
Expand Down

0 comments on commit 4b41b46

Please sign in to comment.