From 133299a9446a78b07eb7b337269507972f6e12ef Mon Sep 17 00:00:00 2001 From: Andre LaBranche Date: Thu, 8 Mar 2018 12:03:37 -0800 Subject: [PATCH] Update copyright --- README.rst | 2 +- pysrc/kerberos.py | 2 +- setup.py | 2 +- src/base64.c | 2 +- src/base64.h | 2 +- src/kerberos.c | 2 +- src/kerberosbasic.c | 2 +- src/kerberosbasic.h | 2 +- src/kerberosgss.c | 2 +- src/kerberosgss.h | 2 +- support/main.c | 2 +- support/update_copyrights | 66 +++++++++++++++++++++++++++++++++++++++ 12 files changed, 77 insertions(+), 11 deletions(-) create mode 100755 support/update_copyrights diff --git a/README.rst b/README.rst index f273f49..a6697e3 100644 --- a/README.rst +++ b/README.rst @@ -120,7 +120,7 @@ See kerberos.py. Copyright and License ===================== -Copyright (c) 2006-2016 Apple Inc. All rights reserved. +Copyright (c) 2006-2018 Apple Inc. All rights reserved. This software is licensed under the Apache License, Version 2.0. The Apache License is a well-established open source license, enabling diff --git a/pysrc/kerberos.py b/pysrc/kerberos.py index 2911d0a..d4f53a6 100644 --- a/pysrc/kerberos.py +++ b/pysrc/kerberos.py @@ -1,5 +1,5 @@ ## -# Copyright (c) 2006-2016 Apple Inc. All rights reserved. +# Copyright (c) 2006-2018 Apple Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/setup.py b/setup.py index b6f0e6f..c8d0d25 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,5 @@ ## -# Copyright (c) 2006-2016 Apple Inc. All rights reserved. +# Copyright (c) 2006-2018 Apple Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/base64.c b/src/base64.c index dbf2c66..4496f92 100644 --- a/src/base64.c +++ b/src/base64.c @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2016 Apple Inc. All rights reserved. + * Copyright (c) 2006-2018 Apple Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/base64.h b/src/base64.h index 3f34082..4ddff3e 100644 --- a/src/base64.h +++ b/src/base64.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2016 Apple Inc. All rights reserved. + * Copyright (c) 2006-2018 Apple Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/kerberos.c b/src/kerberos.c index 744087a..bb007c1 100644 --- a/src/kerberos.c +++ b/src/kerberos.c @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2016 Apple Inc. All rights reserved. + * Copyright (c) 2006-2018 Apple Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/kerberosbasic.c b/src/kerberosbasic.c index 3c77092..08703e1 100644 --- a/src/kerberosbasic.c +++ b/src/kerberosbasic.c @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2016 Apple Inc. All rights reserved. + * Copyright (c) 2006-2018 Apple Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/kerberosbasic.h b/src/kerberosbasic.h index 0205816..c558234 100644 --- a/src/kerberosbasic.h +++ b/src/kerberosbasic.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2016 Apple Inc. All rights reserved. + * Copyright (c) 2006-2018 Apple Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/kerberosgss.c b/src/kerberosgss.c index 10e4020..c82a5e4 100644 --- a/src/kerberosgss.c +++ b/src/kerberosgss.c @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2016 Apple Inc. All rights reserved. + * Copyright (c) 2006-2018 Apple Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/kerberosgss.h b/src/kerberosgss.h index 9381920..362040d 100644 --- a/src/kerberosgss.h +++ b/src/kerberosgss.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2016 Apple Inc. All rights reserved. + * Copyright (c) 2006-2018 Apple Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/support/main.c b/support/main.c index 9b879be..f6546fc 100644 --- a/support/main.c +++ b/support/main.c @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2016 Apple Inc. All rights reserved. + * Copyright (c) 2006-2018 Apple Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/support/update_copyrights b/support/update_copyrights new file mode 100755 index 0000000..7dec520 --- /dev/null +++ b/support/update_copyrights @@ -0,0 +1,66 @@ +#!/bin/sh +# -*- sh-basic-offset: 2 -*- + +## +# Copyright (c) 2013-2016 Apple Inc. All rights reserved. +# +# 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. +## + +set -e; +set -u; + +find_files () { + where="$1"; shift; + + find "${where}" \ + ! \( \ + -type d \ + \( \ + -name .git -o \ + -name build -o \ + -name data -o \ + -name '_trial_temp*' \ + \) \ + -prune \ + \) \ + -type f \ + ! -name '.#*' \ + ! -name '#*#' \ + ! -name '*~' \ + ! -name '*.pyc' \ + ! -name '*.log' \ + ! -name update_copyrights \ + -print0; +} + +wd="$(pwd -P)"; + +this_year="$(date "+%Y")"; +last_year=$((${this_year} - 1)); + +tmp="$(mktemp -t "$$")"; +find_files "${wd}" > "${tmp}"; + +ff () { cat "${tmp}"; } + +echo "Updating copyrights from ${last_year} to ${this_year}..."; + +ff | xargs -0 perl -i -pe 's|(Copyright \(c\) .*-)'"${last_year}"'( Apple)|${1}'"${this_year}"'${2}|'; +ff | xargs -0 perl -i -pe 's|(Copyright \(c\) )'"${last_year}"'( Apple)|${1}'"${last_year}-${this_year}"'${2}|'; + +ff | xargs -0 grep -e 'Copyright (c) .* Apple' \ + | grep -v -e 'Copyright (c) .*'"${this_year}"' Apple' \ + ; + +rm "${tmp}";