I am running a commercial opensource CRM that is a pain to keep in VCS. At the top of every file that isn't "open source"... they put a copywrite like so:
/***********************************************************************************
* Copyright (C) 2011-2015 Company Inc. All Rights Reserved.
*
* blah blah blah that changes every so often
*
******a variable number of stars*****************/
Whenever they change the copyright text/dates, every file I have looks like its changed in git.
So my question How do I do this ( https://stackoverflow.com/a/22171275/140541 ) that will remove the copyright block... just so I don't have to see it in my git and don't have to worry about it when it changes?
Thanks!
UPDATED question.
I really need a sed statement that will turn this:
<?php
/***************************************************************
* Copyright (C) 2011-2015 Company Inc. All Rights Reserved.
*
* blah blah blah that changes every so often
*
******************************/
some code
/***
* foo here
*/
Into this:
<?php
/***************************************************************
* some text here
******************************/
some code
/***
* foo here
*/
BUT it needs to only work if the first comment in a file has the word "Copyright" in it.