Skip to content

Commit 767b7b9

Browse files
Add script to rename COPYING.LESSER to LICENSE
1 parent 6a8d159 commit 767b7b9

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

source/scripts/rename_license

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#!/bin/sh
2+
#########################################################################
3+
##
4+
## This file is part of the SAMRAI distribution. For full copyright
5+
## information, see COPYRIGHT and LICENSE.
6+
##
7+
## Copyright: (c) 1997-2016 Lawrence Livermore National Security, LLC
8+
## Description: bash script to update copyright dates in SAMRAI files
9+
##
10+
#########################################################################
11+
12+
# Note: this may work with sh but I have not tested it. sh probably
13+
# won't be able to handle a large number of files in the "for"
14+
# statement.
15+
16+
#=============================================================================
17+
# Change the copyright statement in all files which have the date.
18+
#=============================================================================
19+
#
20+
# These are the commands you can use to replace the copyright date
21+
# in all files.
22+
#
23+
# You may want to run each of these commands from the command line to
24+
# make sure things are doing what you think they should be doing.
25+
# (The author does this which is why they are seperated into the
26+
# steps, you could make this more efficient).
27+
#
28+
29+
#=============================================================================
30+
# First find all the files with old copyright dates
31+
#=============================================================================
32+
find . -type f ! -name \*.svn\* -exec grep -l "LICENSE" {} \; > files
33+
34+
#=============================================================================
35+
# Replace the old copyright dates with new dates
36+
#=============================================================================
37+
for i in `cat files`
38+
do
39+
echo $i
40+
cp $i $i.sed.bak
41+
sed "s/LICENSE/LICENSE/" $i.sed.bak > $i
42+
done
43+
44+
#=============================================================================
45+
# Remove the temporary files
46+
#=============================================================================
47+
find . -name \*.sed.bak -exec rm {} \;
48+
rm files
49+

0 commit comments

Comments
 (0)