From fc0a21d66497172f7e9bbfa8b0fc65ca09419368 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 11 May 2009 12:43:43 +0200 Subject: [PATCH] New util to fix headers (Copyright range). --- fixup-headers/fixup.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 fixup-headers/fixup.sh 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 + -- 1.7.10.4