annotate make/scripts/addNotices.sh @ 57834:00d9f8de0e3d

Automatic merge with records-and-sealed
author mcimadamore
date Thu, 19 Sep 2019 15:47:00 +0000
parents c7d7946239de
children
rev   line source
erikj@12892 1 #! /bin/sh
erikj@12892 2 #
alanb@14342 3 # Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
erikj@12892 4 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
erikj@12892 5 #
erikj@12892 6 # This code is free software; you can redistribute it and/or modify it
erikj@12892 7 # under the terms of the GNU General Public License version 2 only, as
erikj@12892 8 # published by the Free Software Foundation. Oracle designates this
erikj@12892 9 # particular file as subject to the "Classpath" exception as provided
erikj@12892 10 # by Oracle in the LICENSE file that accompanied this code.
erikj@12892 11 #
erikj@12892 12 # This code is distributed in the hope that it will be useful, but WITHOUT
erikj@12892 13 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
erikj@12892 14 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
erikj@12892 15 # version 2 for more details (a copy is included in the LICENSE file that
erikj@12892 16 # accompanied this code).
erikj@12892 17 #
erikj@12892 18 # You should have received a copy of the GNU General Public License version
erikj@12892 19 # 2 along with this work; if not, write to the Free Software Foundation,
erikj@12892 20 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
erikj@12892 21 #
erikj@12892 22 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
erikj@12892 23 # or visit www.oracle.com if you need additional information or have any
erikj@12892 24 # questions.
erikj@12892 25 #
erikj@12892 26
erikj@12892 27 # Parse the first contiguous comment block in this script and generate
ihse@20547 28 # a java comment block. If this script is invoked with a copyright
erikj@12892 29 # year/year range, the java comment block will contain a Sun copyright.
erikj@12892 30
erikj@12892 31 COPYRIGHT_YEARS="$1"
erikj@12892 32
erikj@12892 33 cat <<__END__
erikj@12892 34 /*
erikj@12892 35 __END__
erikj@12892 36
erikj@12892 37 if [ "x$COPYRIGHT_YEARS" != x ]; then
erikj@12892 38 cat <<__END__
erikj@12892 39 * Copyright (c) $COPYRIGHT_YEARS Oracle and/or its affiliates. All rights reserved.
erikj@12892 40 __END__
erikj@12892 41 fi
erikj@12892 42
erikj@12892 43 $NAWK ' /^#.*Copyright.*Oracle/ { next }
ihse@20547 44 /^#([^!]|$)/ { sub(/^#/, " *"); print }
ihse@20547 45 /^$/ { print " */"; exit } ' $0