Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main Repositories
otb
Commits
9d83cbe4
Commit
9d83cbe4
authored
1 month ago
by
Tristan Laurent
Browse files
Options
Downloads
Patches
Plain Diff
FEAT: add a copyright update script
parent
adf84d03
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1054
BUG: fix empty OS variable, fix osgeo finding on rhel-based OS
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Utilities/Maintenance/update_copyright_date.sh
+16
-0
16 additions, 0 deletions
Utilities/Maintenance/update_copyright_date.sh
with
16 additions
and
0 deletions
Utilities/Maintenance/update_copyright_date.sh
0 → 100755
+
16
−
0
View file @
9d83cbe4
#!/bin/bash
tmp_file_name
=
"_tmp_file_list.txt"
# get all files
find
.
-type
f
>
$tmp_file_name
current_year
=
$(
date
-u
| egrep
-o
"[0-9]{4}"
)
# for all files, update the year to current
while
IFS
=
read
-r
f_path
;
do
# except for this current script
if
[
"
$f_path
"
!=
$0
]
;
then
sed
-i
"s/Copyright (C) 2005-20../Copyright (C) 2005-
$current_year
/g"
"
$line
"
fi
done
<
"
$tmp_file_name
"
rm
$tmp_file_name
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment