Skip to content
Snippets Groups Projects
Commit 67adee5e authored by Matthew Laird's avatar Matthew Laird Committed by GitHub
Browse files

Merge pull request #172 from thomasmaurel/annual_copyright_updater

Updating script to be able to update the EBI Copyright every year. No…
parents b852ba51 2ab02629
No related branches found
No related tags found
No related merge requests found
......@@ -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="\1[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