summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xfix-copyright-years (renamed from host/fix-copyright-years)5
1 files changed, 4 insertions, 1 deletions
diff --git a/host/fix-copyright-years b/fix-copyright-years
index f5a3d5822..c6ee16a21 100755
--- a/host/fix-copyright-years
+++ b/fix-copyright-years
@@ -1,6 +1,7 @@
#!/usr/bin/env python
import re
+import sys
import datetime
import subprocess
import multiprocessing
@@ -50,8 +51,10 @@ def fix_co_years(files):
open(file, 'w').write(new_text)
if __name__ == "__main__":
+ if len(sys.argv) < 2: print "Usage: %s path/"%sys.argv[0]; exit()
+
#get recursive list of files in the repo
- files = command('git', 'ls-tree', '--name-only', 'HEAD', '-r').splitlines()
+ files = command('git', 'ls-tree', '--name-only', 'HEAD', '-r', sys.argv[1]).splitlines()
#start n+1 processes to handle the files
num_procs = multiprocessing.cpu_count()