aboutsummaryrefslogtreecommitdiffstats
path: root/update_copyright.py
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2009-11-20 07:57:17 -0500
committerW. Trevor King <wking@drexel.edu>2009-11-20 07:57:17 -0500
commit11930e31b3511354da05550d3f7cf9593828df76 (patch)
tree812630ebb34add3a6dbfaeb888e0cdebce29b73f /update_copyright.py
parent163b3aff3cc5de23bd5e88ba73dd957034cc206d (diff)
downloadbugseverywhere-11930e31b3511354da05550d3f7cf9593828df76.tar.gz
Have release.py update copyrights as well.
Diffstat (limited to 'update_copyright.py')
-rwxr-xr-xupdate_copyright.py27
1 files changed, 14 insertions, 13 deletions
diff --git a/update_copyright.py b/update_copyright.py
index 4a52fee..6cdaa2f 100755
--- a/update_copyright.py
+++ b/update_copyright.py
@@ -409,6 +409,19 @@ def update_file(filename, verbose=True):
f.write(contents)
f.close()
+def update_files(files=None):
+ if files == None or len(files) == 0:
+ p = Pipe([['grep', '-rc', '# Copyright', '.'],
+ ['grep', '-v', ':0$'],
+ ['cut', '-d:', '-f1']])
+ assert p.status == 0
+ files = p.stdout.rstrip().split('\n')
+
+ for filename in files:
+ if ignored_file(filename) == True:
+ continue
+ update_file(filename)
+
def test():
import doctest
doctest.testmod()
@@ -439,16 +452,4 @@ automatically.
sys.exit(0)
update_authors()
-
- files = args
- if len(files) == 0:
- p = Pipe([['grep', '-rc', '# Copyright', '.'],
- ['grep', '-v', ':0$'],
- ['cut', '-d:', '-f1']])
- assert p.status == 0
- files = p.stdout.rstrip().split('\n')
-
- for filename in files:
- if ignored_file(filename) == True:
- continue
- update_file(filename)
+ update_files(files=args)