From: Adam Dickmeiss Date: Mon, 11 May 2009 10:43:43 +0000 (+0200) Subject: New util to fix headers (Copyright range). X-Git-Url: http://lists.indexdata.com/cgi-bin?a=commitdiff_plain;h=fc0a21d66497172f7e9bbfa8b0fc65ca09419368;p=git-tools-moved-to-github.git New util to fix headers (Copyright range). --- diff --git a/fixup-headers/fixup.sh b/fixup-headers/fixup.sh new file mode 100755 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 +