Draft: Module spdx
find ./ | grep vtk.module | xargs -I %s sed '/^DEPENDS/i SPDX_LICENSE_IDENTIFIER\n BSD-3-CLAUSE\nSPDX_COPYRIGHT_TEXT\n Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen' -i %s
grep -rl "See Copyright.txt or http://www.kitware.com/Copyright.htm for details" > files.out
grep -rl "See LICENSE.txt for details." > files.out
grep -rl "Program: Visualization Toolkit" > files.out
grep -rl "\-\*\- c++ -*-" >files.out
grep -rl "Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive" > files.out
grep -rl DE-AC04-94AL85000 > files.out
cat files.out | xargs -I %s perl -i~ -0777 -pe 's/\/\*=========================================================================(.|\n)*.*Program: Visualization Toolkit\n.*Module:.*\n\n Copyright \(c\) Ken Martin, Will Schroeder, Bill Lorensen\n All rights reserved.\n See Copyright.txt or .* for details.\n\n.*\n.*\n.*\n.*\*\//\/\/ SPDX-FileCopyrightText: Copyright \(c\) Ken Martin, Will Schroeder, Bill Lorensen\n\/\/ SPDX-License-Identifier: BSD-3-CLAUSE/g' %s
cat files.out | xargs -I %s perl -i~ -0777 -pe 's/\/\*=========================================================================(.|\n)*.*Program: Visualization Toolkit\n.*Module:.*\n\n Copyright \(c\) Ken Martin, Will Schroeder, Bill Lorensen\n All rights reserved.\n See Copyright.txt or .* for details.\n\n.*\n.*\n.*\n\n.*\*\//\/\/ SPDX-FileCopyrightText: Copyright \(c\) Ken Martin, Will Schroeder, Bill Lorensen\n\/\/ SPDX-License-Identifier: BSD-3-CLAUSE/g' %s
cat files.out | xargs -I %s perl -i~ -0777 -pe 's/\/\*=========================================================================\n.*Program:.*Visualization Toolkit\n.*Copyright \(c\) Ken Martin, Will Schroeder, Bill Lorensen\n.*All rights reserved.\n.*See Copyright.txt or .* for details.\n.*\n.*\n.*\n.*\*\//\/\/ SPDX-FileCopyrightText: Copyright \(c\) Ken Martin, Will Schroeder, Bill Lorensen\n\/\/ SPDX-License-Identifier: BSD-3-CLAUSE/g' %s
Edited by Mathieu Westphal (Kitware)