projects
/
git-tools-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fa948e1
)
New util to fix headers (Copyright range).
author
Adam Dickmeiss
<adam@indexdata.dk>
Mon, 11 May 2009 10:43:43 +0000
(12:43 +0200)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Mon, 11 May 2009 10:43:43 +0000
(12:43 +0200)
fixup-headers/fixup.sh
[new file with mode: 0755]
patch
|
blob
diff --git a/fixup-headers/fixup.sh
b/fixup-headers/fixup.sh
new file mode 100755
(executable)
index 0000000..
3d9b92e
--- /dev/null
+++ b/
fixup-headers/fixup.sh
@@ -0,0
+1,17
@@
+#!/bin/sh
+R="$1"
+if test -z "$R"; then
+ echo "Supply range. Eg 2006-2009"
+ exit 1
+fi
+for f in `find . \( -name '*.[ch]' -or -name Makefile.am -or -name '*.cpp' -or -name '*.hpp' \) -print`; do
+ echo $f
+ sed "s/Copyri.*20.*Data/Copyright (C) $R Index Data/g" < $f >${f}_new
+ if diff $f ${f}_new >/dev/null; then
+ :
+ else
+ cp ${f}_new ${f}
+ fi
+ rm ${f}_new
+done
+