Skip to content

Instantly share code, notes, and snippets.

@objectiser
Created October 10, 2017 08:36
Show Gist options
  • Save objectiser/81491af29de2d1043764425f9c7d90a6 to your computer and use it in GitHub Desktop.
Save objectiser/81491af29de2d1043764425f9c7d90a6 to your computer and use it in GitHub Desktop.
Change a MIT license header to Apache
perl -i -p0e 's/\/\/ Permission.*?SOFTWARE\./\/\/ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except\n\/\/ in compliance with the License. You may obtain a copy of the License at\n\/\/\n\/\/ http:\/\/www.apache.org\/licenses\/LICENSE-2.0\n\/\/\n\/\/ Unless required by applicable law or agreed to in writing, software distributed under the License\n\/\/ is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express\n\/\/ or implied. See the License for the specific language governing permissions and limitations under\n\/\/ the License.\n/s' $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment