File: fix_copyright.sh

package info (click to toggle)
mapnik 3.0.12%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 17,084 kB
  • ctags: 18,454
  • sloc: cpp: 142,516; python: 1,416; sh: 769; makefile: 170; xml: 140; lisp: 13
file content (20 lines) | stat: -rwxr-xr-x 454 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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