aboutsummaryrefslogtreecommitdiff
path: root/tools/update-copyright
blob: 0f2ba80f3fdaf7582a738ce1b59614dce296409a (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash

# Set the current year as a variable
current_year=$(date +"%Y")

# Find all files in the sys/ directory and its subdirectories
find . -type f -print0 | while read -d $'\0' file
do
  # Replace the old copyright notice with the new one
  sed -i "s/\(Copyright (c) \)2023-[0-9]\{4\}\(.*\)/\12023-${current_year}\2/g" "${file}"
done