Skip to content
Snippets Groups Projects
Commit 9d83cbe4 authored by Tristan Laurent's avatar Tristan Laurent
Browse files

FEAT: add a copyright update script

parent adf84d03
No related branches found
No related tags found
1 merge request!1054BUG: fix empty OS variable, fix osgeo finding on rhel-based OS
#!/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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment