Skip to main content

Tip Replace an old copyright by a new one

Today, I searched a tool to replace the old copyright of the GNU GPL V3 license by the copyright of the Apache License 2.0. But I've not found a simple tool to do a multi-line replacement in a complete set of files. So like the developer I'm, I decided to do it myself. And because it can be useful to someone else and because open source is good, I also decided to give it to everything that want :)

The usage is quite simple :

java -jar RCR.jar old_file new_file file
  • old_file is the path to a file containing the old copyright
  • new_file is the path to the file containing the new copyright
  • file is a folder to make the replacements in. If it's a folder, all the files and sub-folders will be searched for replacements.

Here, I'm talking about a copyright, but it of course also works for any other multi-line replacement you want.

The jar is available here : RCR.jar

The sources is available here :

I hope that will be useful to someone.


Comments powered by Disqus