aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-01-13 16:21:01 -0800
committerJosh Blum <josh@joshknows.com>2011-01-13 16:21:01 -0800
commit81bf9eff259bddefe63ee8b4b70430a7306967c7 (patch)
treebd89ef66c3d88b9c4cbf0bd8e582b23386a8862e
parentad51739550a6998d9de09460b8d6d8af386ace15 (diff)
downloaduhd-81bf9eff259bddefe63ee8b4b70430a7306967c7.tar.gz
uhd-81bf9eff259bddefe63ee8b4b70430a7306967c7.tar.bz2
uhd-81bf9eff259bddefe63ee8b4b70430a7306967c7.zip
uhd: moved fix-co-years and added path option
-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()