diff options
author | Ian Moffett <ian@osmora.org> | 2024-06-04 13:41:11 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-06-04 13:45:31 -0400 |
commit | 98ccb3a2d41015b42d46d8b382decc755a003c3f (patch) | |
tree | 4e514830880a4deabebb60c38055792695314ae6 /tools/update-copyright |
project: Initial commit
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'tools/update-copyright')
-rwxr-xr-x | tools/update-copyright | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/update-copyright b/tools/update-copyright new file mode 100755 index 0000000..0f2ba80 --- /dev/null +++ b/tools/update-copyright @@ -0,0 +1,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 |