aboutsummaryrefslogtreecommitdiff
path: root/tools/update-copyright
diff options
context:
space:
mode:
authornishi <nishi@vegaa.systems>2023-07-07 23:40:27 +0000
committernishi <nishi@vegaa.systems>2023-07-07 23:40:27 +0000
commitd963772c6633a0610898aaba2ae90d461e8f2de8 (patch)
tree64d9e0a7b09b205d5f42011aa2bfe88e321f706d /tools/update-copyright
should be working, should be
git-svn-id: https://svn.vegaa.systems/svn/vega-Vega/trunk@7 a8a8aea2-181d-ee11-89e8-15fd0e089fc4
Diffstat (limited to 'tools/update-copyright')
-rwxr-xr-xtools/update-copyright12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/update-copyright b/tools/update-copyright
new file mode 100755
index 0000000..934803e
--- /dev/null
+++ b/tools/update-copyright
@@ -0,0 +1,12 @@
+#!/bin/bash
+# $Id$
+
+# 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) \)[0-9]\{4\}\(.*\)/\1${current_year}\2/g" "${file}"
+done