Skip to content
Browse files

- 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)
  • Loading branch information...
1 parent f1fb0c1 commit f85965142d9afa9ea112c143421b238c0cc12f86 @kunitoki kunitoki committed Oct 23, 2011
Showing with 20 additions and 0 deletions.
  1. +20 −0 utils/src_utils/fix_copyright.sh
View
20 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

0 comments on commit f859651

Please sign in to comment.
Something went wrong with that request. Please try again.