Skip to content
Snippets Groups Projects
Commit bb38ec4d authored by Thomas Maurel's avatar Thomas Maurel
Browse files

Updating script to be able to update the EBI Copyright every year. Now...

Updating script to be able to update the EBI Copyright every year. Now excluding the .git directory from the file search as this was corrupting the git repos
parent 8d91a4e0
No related branches found
No related tags found
2 merge requests!172Updating script to be able to update the EBI Copyright every year. No…,!172Updating script to be able to update the EBI Copyright every year. No…
......@@ -34,12 +34,12 @@ for var in $dirs; do
year=$(date "+%Y")
last_year=$(($year - 1))
search="^\(.*\)\\[1999-[0-9]*\\] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute"
replacement="\1[1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute\n\1[2016] EMBL-European Bioinformatics Institute"
search="^\(.*\)\\[2016\(-*[0-9]*\)\\] EMBL-European Bioinformatics Institute"
replacement="Copyright [2016-$year] EMBL-European Bioinformatics Institute"
echo "About to scan $(pwd) for files to replace '$search' with '$replacement'"
for file in $(grep -R --files-with-matches "$search" .); do
for file in $(grep -R --files-with-matches "$search" --exclude-dir=.git .); do
echo "Replacing date in $file"
if [ "$(uname)" = "Darwin" ]; then
LC_CTYPE=C LANG=C sed -i '' -e "s/$search/$replacement/g" $file
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment