Our project is open source and I need to substitute all our copyright headers for our new license's. The project consists of about 1500 C++/Obj-C/Java files across a nested folder hierarchy.
A header spans from 1 to 5 lines with different formatting, so a regex is not assured to find it in all of them.
What approach would you take here?
Example:
C++ file:
/*******************************************************************************
* Copyright 1996: Börk Börk Inc. All Rights
* Reserved. Proprietary and Confidential information of BOBO. Disclosure,
* Use, or Reproduction without written authorization of BOBO is prohibited.
*******************************************************************************/
#ifndef Things_cpp
#define Things_cpp
#include <LibOne.hpp>
#include <LibTwo.hpp>
Namespacington::ClassName::HereBeMethod(void)
{
}
#endif
Java file:
package com.bork.bork.boooork;
/*******************************************************
* Copyright 1996: Börk Börk Inc. All Rights Reserved.
* Proprietary and Confidential information of BOBO.
* Disclosure, Use, or Reproduction without written
* authorization of BOBO is prohibited.
*******************************************************
import java.util.List;
/**
* <p>
* Callback interface/protocol for a proxy factory.
* </p>
*/
@SuppressWarnings("all")
public interface ProxyFactorize
{
/**
* <p>
* Do the thing
* </p>
* @param bork Spices
* @param borkbork Condiments
*/
void apply(double bork, double borkbork);
}
Obj-C file:
/*******************************************************
* Copyright 1996: Börk Börk Inc.
* All Rights Reserved.
* Proprietary and Confidential information of BOBO.
* Disclosure, Use, or Reproduction without written
* authorization of BOBO is prohibited.
********************************************************/
#import <Bork/Booork.h>
@class Biorjk;
/**
* Bork bork bork booooork
*
* @warning Bork?
*
* @warning Bork
*
*/
@interface Biorjk : Borkburk
@end
New license to be applied to all files:
/* Copyright 2015 Bork Bork
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */