Martin Roth | 0ad5fbd | 2020-12-24 12:06:38 -0700 | [diff] [blame] | 1 | #!/usr/bin/env sh |
Patrick Georgi | 1afe286 | 2020-05-10 17:34:15 +0200 | [diff] [blame] | 2 | # SPDX-License-Identifier: ISC |
Patrick Georgi | 3270369 | 2015-06-26 23:23:21 +0200 | [diff] [blame] | 3 | |
Patrick Georgi | ee0028d | 2015-10-13 22:11:13 +0200 | [diff] [blame] | 4 | filelist=$(git ls-files $* | \ |
| 5 | grep -Ev "^($(git submodule status |cut -d' ' -f3 |tr '\012' '|' | sed "s,|$,,"))$" | \ |
| 6 | grep -Ev "\.patch$|_shipped$|\<LICENSE_GPL$|\<LGPL.txt$|\<COPYING$|\<DISCLAIMER$|^util/kconfig/|\<no-fsf-addresses.sh$") |
| 7 | |
Patrick Georgi | 3270369 | 2015-06-26 23:23:21 +0200 | [diff] [blame] | 8 | sed -i \ |
| 9 | -e "s:Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *MA[, ]*02110-1301[, ]*USA:Foundation, Inc.:" \ |
Patrick Georgi | ee0028d | 2015-10-13 22:11:13 +0200 | [diff] [blame] | 10 | -e "s:Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *MA[, ]*02110-1301[, ]*\$$:Foundation, Inc.:" \ |
Patrick Georgi | 3270369 | 2015-06-26 23:23:21 +0200 | [diff] [blame] | 11 | -e "s:Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA:Foundation, Inc.:" \ |
| 12 | -e "s:Foundation, Inc., 59 Temple Place[-, ]*Suite 330, Boston, MA *02111-1307[, ]*USA:Foundation, Inc.:" \ |
| 13 | -e "s:Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.:Foundation, Inc.:" \ |
Patrick Georgi | ee0028d | 2015-10-13 22:11:13 +0200 | [diff] [blame] | 14 | -e "/Foundation, Inc./ {N;s:Foundation, Inc.* USA\.* *:Foundation, Inc. :;s:Foundation, Inc. $:Foundation, Inc.:}" \ |
| 15 | $filelist |
| 16 | |
| 17 | sed -i \ |
| 18 | -e "/^[ \t\*#/-]*$/ { |
| 19 | N |
| 20 | /You should have received a copy of the GNU/ { |
| 21 | N |
| 22 | /You should have received a copy of the GNU.*along with this program\.[\., ]*$/ d |
| 23 | /You should have received a copy of the GNU.*[iI]f not, write to[^[:alnum:]]*the Free.*Software[^[:alnum:]]*Foundation,[^[:alnum:]]*Inc\.[\., ]*$/ d |
| 24 | /You should have received a copy of the GNU.*[iI]f not, see.*http:\/\/www.gnu.org\/licenses\/>[\. ]*$/ d |
| 25 | N |
| 26 | /You should have received a copy of the GNU.*[iI]f not, write to[^[:alnum:]]*the Free.*Software[^[:alnum:]]*Foundation,[^[:alnum:]]*Inc\.[\., ]*$/ d |
| 27 | /You should have received a copy of the GNU.*[iI]f not, write to[^[:alnum:]]*the Free.*Software[^[:alnum:]]*Foundation,[^[:alnum:]]*Inc\.[\., ]*\*\// s:^.*\*/:\*/: |
| 28 | /You should have received a copy of the GNU.*[iI]f not, write to[^[:alnum:]]*the Free.*Software[^[:alnum:]]*Foundation[\., ]*\*\// s:^.*\*/:\*/: |
| 29 | /You should have received a copy of the GNU.*[iI]f not, see.*http:\/\/www.gnu.org\/licenses\/>[\. ]*$/ d |
| 30 | N |
| 31 | /You should have received a copy of the GNU.*[iI]f not, see.*http:\/\/www.gnu.org\/licenses\/>[\. ]*$/ d |
| 32 | /You should have received a copy of the GNU.*[iI]f not, see.*http:\/\/www.gnu.org\/licenses\/>[\. ]*\*\// s:^.*\*/:\*/: |
| 33 | }}" \ |
| 34 | $filelist |