Lines 3-12
Link Here
|
3 |
# |
3 |
# |
4 |
# Check that the copyright information is valid |
4 |
# Check that the copyright information is valid |
5 |
# |
5 |
# |
|
|
6 |
echo "top srcdir: ${top_srcdir:=..}" |
6 |
nfails=0 |
7 |
nfails=0 |
7 |
nfiles=0 |
8 |
nfiles=0 |
8 |
for dir in $(make -s echo-dirs -C ..); do |
9 |
for dir in $(make -s echo-dirs -C ..); do |
9 |
if [ ! -d "../$dir" ]; then continue; fi |
10 |
if [ ! -d "$top_srcdir/$dir" ]; then continue; fi |
10 |
for x in $(make -s echo-sources -C ../$dir); do |
11 |
for x in $(make -s echo-sources -C ../$dir); do |
11 |
case "$x" in |
12 |
case "$x" in |
12 |
*.c|*.cpp|*.h|*.m|*.php|*.cs|*.java|.py|.pl) |
13 |
*.c|*.cpp|*.h|*.m|*.php|*.cs|*.java|.py|.pl) |
Lines 14-20
Link Here
|
14 |
*) |
15 |
*) |
15 |
continue ;; |
16 |
continue ;; |
16 |
esac |
17 |
esac |
17 |
if ! grep 'Copyright *([cC])' "../$dir/$x" >/dev/null 2>&1; then |
18 |
if ! grep 'Copyright *([cC])' "$top_srcdir/$dir/$x" >/dev/null 2>&1; then |
18 |
echo "error: $dir/$x lacks proper copyright information" |
19 |
echo "error: $dir/$x lacks proper copyright information" |
19 |
nfails=$(($nfails + 1)) |
20 |
nfails=$(($nfails + 1)) |
20 |
elif [ -d ../.git ]; then |
21 |
elif [ -d ../.git ]; then |