Skip to content

Commit f859651

Browse files
committed
- 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)
1 parent f1fb0c1 commit f859651

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

utils/src_utils/fix_copyright.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
3+
if [ $# -ne 1 ]
4+
then
5+
echo "Usage: `basename $0` YEAR"
6+
exit 1
7+
fi
8+
9+
YEAR=$1
10+
DIRECTORIES=( "include/mapnik" "src" "plugins/input" "demo/c++" "demo/viewer" )
11+
12+
SED="sed -i -e"
13+
COMMAND="s: \* Copyright (C) 20[0-9][0-9].*: \* Copyright (C) $YEAR Artem Pavlenko:g"
14+
15+
for d in "${DIRECTORIES[@]}"
16+
do
17+
for f in $(find "../../$d" -type f \( -iname '*.hpp' -o -iname '*.cpp' -o -iname '*.h' -o -iname '*.c' \)); do
18+
$SED "$COMMAND" $f
19+
done
20+
done

0 commit comments

Comments
 (0)