Commit 455b0b12 authored by Guillaume Roguez's avatar Guillaume Roguez

tools: make update-copyright usable without modifications

No more needed to change the script to update the date.

Refs #68586

Change-Id: I86c99beda652169e9a761990be211a6bd2aacd96
parent ce9c9741
# Copyright (C) 2004-2013 Savoir-Faire Linux Inc.
# Copyright (C) 2004-2015 Savoir-Faire Linux Inc.
# Author: Emmanuel Milou <>
# This program is free software: you can redistribute it and/or modify
......@@ -28,15 +28,15 @@
# as that of the covered work.
cd ..
# List all files
FILES=`find -name "*.h" -o -name "*.c" -o -name "*.cpp" -o -name "*.i" -o -name "README" -o -name "*.sh"`
# List all files in current directory
FILES=`find -name "*.h" -o -name "*.c" -o -name "*.cpp" -o -name "*.i" -o -name "README" -o -name "*.sh" -o -name "*.py"`
year=`date +%Y`
# Loop and replace
for f in $FILES
sed -i "s/\-2012 Savoir-Faire Linux Inc/\-2013 Savoir-Faire Linux Inc/g" $f
sed -i "s/ 2012 Savoir-Faire Linux Inc/ 2012-2013 Savoir-Faire Linux Inc/g" $f
sed -i "/$year/b; s/\-[0-9]\+ Savoir-Faire Linux Inc/-$year Savoir-Faire Linux Inc/g" $f
sed -i "/$year/b; s/ \([0-9]\+\) Savoir-Faire Linux Inc/ \1-$year Savoir-Faire Linux Inc/g" $f
exit 0;
Markdown is supported
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