From 873a4112b0b96642327861eb7771ffc94d7859e0 Mon Sep 17 00:00:00 2001 From: kunitoki Date: Sun, 23 Oct 2011 15:11:14 +0200 Subject: [PATCH] - small script to keep copyright aligned in all files (bindings have different copyright owners, need to understand if we need to keep those as they are) --- utils/src_utils/fix_copyright.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 utils/src_utils/fix_copyright.sh diff --git a/utils/src_utils/fix_copyright.sh b/utils/src_utils/fix_copyright.sh new file mode 100755 index 000000000..78c068c59 --- /dev/null +++ b/utils/src_utils/fix_copyright.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +if [ $# -ne 1 ] +then + echo "Usage: `basename $0` YEAR" + exit 1 +fi + +YEAR=$1 +DIRECTORIES=( "include/mapnik" "src" "plugins/input" "demo/c++" "demo/viewer" ) + +SED="sed -i -e" +COMMAND="s: \* Copyright (C) 20[0-9][0-9].*: \* Copyright (C) $YEAR Artem Pavlenko:g" + +for d in "${DIRECTORIES[@]}" +do + for f in $(find "../../$d" -type f \( -iname '*.hpp' -o -iname '*.cpp' -o -iname '*.h' -o -iname '*.c' \)); do + $SED "$COMMAND" $f + done +done