Skip to content

Instantly share code, notes, and snippets.

@fblundun
Created September 29, 2015 11:19
Show Gist options
  • Save fblundun/a6e81a48071e47e726ab to your computer and use it in GitHub Desktop.
Save fblundun/a6e81a48071e47e726ab to your computer and use it in GitHub Desktop.
Script to update Snowplow copyright notices
@fblundun
Copy link
Author

If you use this, check that it has functioned as expected before committing...

@fblundun
Copy link
Author

This doesn't seem to work for me on OS X - the branching directive isn't recognised. Use this instead:

  # Update copyright notices which already have a range of dates ("2012-2013" -> "2012-2015")
  sed "/$year/! s/Copyright (c) \([0-9]*\)-[0-9]* Snowplow Analytics Ltd/Copyright (c) \1-$year Snowplow Analytics Ltd/" |
  # Update copyright notices which have a single date ("2012" -> "2012-2015")
  sed "/$year/! s/Copyright (c) \([0-9]*\) Snowplow Analytics Ltd/Copyright (c) \1-$year Snowplow Analytics Ltd/" > tmp;

@fblundun
Copy link
Author

fblundun commented Mar 8, 2016

Warning: this script may alter file permissions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment