Shad Ansari | 2f7f9be | 2017-06-07 13:34:53 -0700 | [diff] [blame] | 1 | #!/usr/bin/perl |
| 2 | ############################################################################### |
| 3 | # |
| 4 | # Copyright 2008-2014 Broadcom Corporation |
| 5 | # |
| 6 | # This program is the proprietary software of Broadcom Corporation |
| 7 | # and/or its licensors, and may only be used, duplicated, modified or |
| 8 | # distributed pursuant to the terms and conditions of a separate, |
| 9 | # written license agreement executed between you and Broadcom (an |
| 10 | # "Authorized License"). Except as set forth in an Authorized License, |
| 11 | # Broadcom grants no license (express or implied), right to use, or |
| 12 | # waiver of any kind with respect to the Software, and Broadcom |
| 13 | # expressly reserves all rights in and to the Software and all |
| 14 | # intellectual property rights therein. IF YOU HAVE NO AUTHORIZED |
| 15 | # LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS SOFTWARE IN ANY WAY, AND |
| 16 | # SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE ALL USE OF THE |
| 17 | # SOFTWARE. |
| 18 | # |
| 19 | # Except as expressly set forth in the Authorized License, |
| 20 | # |
| 21 | # 1. This program, including its structure, sequence and organization, |
| 22 | # constitutes the valuable trade secrets of Broadcom, and you shall use |
| 23 | # all reasonable efforts to protect the confidentiality thereof, and to |
| 24 | # use this information only in connection with your use of Broadcom |
| 25 | # integrated circuit products. |
| 26 | # |
| 27 | # 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED |
| 28 | # "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, |
| 29 | # REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR |
| 30 | # OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY |
| 31 | # DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, |
| 32 | # NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, |
| 33 | # ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR |
| 34 | # CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT |
| 35 | # OF USE OR PERFORMANCE OF THE SOFTWARE. |
| 36 | # |
| 37 | # 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM |
| 38 | # OR ITS LICENSORS BE LIABLE FOR (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, |
| 39 | # INDIRECT, OR EXEMPLARY DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY |
| 40 | # RELATING TO YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF |
| 41 | # BROADCOM HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES; OR (ii) |
| 42 | # ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE SOFTWARE |
| 43 | # ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE LIMITATIONS SHALL APPLY |
| 44 | # NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF ANY LIMITED |
| 45 | # REMEDY. |
| 46 | # |
| 47 | ############################################################################### |
| 48 | # |
| 49 | # Script: strip_sh_copyright.pl |
| 50 | # |
| 51 | # Purpose: This script removes a copyright header from a shell script |
| 52 | # file or Makefile. The file is passed into the perl script via |
| 53 | # STDIN, so this script must be used in conjunction with something |
| 54 | # like 'cat'. |
| 55 | # |
| 56 | # Usage: cat <file> | ./strip_sh_copyright.pl |
| 57 | # |
| 58 | ############################################################################### |
| 59 | |
| 60 | $/ = undef; |
| 61 | $_ = <>; |
| 62 | s/##+(?:[^#]|(?:#[^#])*)*Copyright(?:[^#]|(?:#[^#])*)*##+\n//g; |
| 63 | print; |